Viewing 15 posts - 1 through 15 (of 68 total)
BEGIN TRY
BEGIN TRAN
DECLARE cursor1 CURSOR FOR
SELECT Column1,column2,column3 FROM table1 WHERE ID = @ID
OPEN cursor1
FETCH NEXT FROM cursor1
INTO @Column1,@column2,@column3
WHILE @@FETCH_STATUS = 0
BEGIN
Update @table2 SET Column1 =@Column1,Column2 = @column3 where ID =...
November 28, 2010 at 10:48 pm
The cursor I have shown above is just an example the actual is more complicated than above.
November 28, 2010 at 10:03 pm
The output which you have shown is correct except for these
09:30 & 11:00 should not come because for Ins_No 3 the active is 1
13:30 should not come because for...
June 17, 2010 at 12:48 am
My final output from temptime should be
00:30 to 04:30 because there is no entry for any time between this range
06:30 to 09:00
11:30
14:00 to 17:30
21:30 to 23:30 all these are...
June 16, 2010 at 11:49 am
I tried using -c
bcp AdventureWorks.HumanResources.myTeam in input.dat -U username -S servername -t , -f myTeam.Fmt -c
It gave the message that -f overwrites the -c
March 30, 2010 at 1:34 am
I used [] for column names in the format file and in the bcp command prompt I added -q.
bcp AdventureWorks.HumanResources.myTeam in input.dat -U username -S servername -t , -f myTeam.Fmt...
March 29, 2010 at 11:33 pm
Thanks Bhuvnesh I got it
March 29, 2010 at 5:27 am
Hi Bhuvnesh, can you show me for the attached example how to use the
'-q' parameter in bcp for the column names.
March 29, 2010 at 5:14 am
The format file for Varchar(max) is 0 and it works fine I think the bit field is or the one causing the problem.
March 25, 2010 at 7:29 am
Ok thanks for replies I got want I wanted.
March 4, 2010 at 5:17 am
Thanks Ramesh its working according to my requirement.
February 6, 2010 at 2:43 am
yes we can update other column such as Product_id,channel_id but only to zero value Take this ex:
ID Product_ID,Market_ID,Channel_ID,Volume,Period_ID,Upgrades
185 640 60 15 150.00 18 0
1458 640 60 15 704.00 18 0
2587...
February 6, 2010 at 1:39 am
Yes, It works like this Today I am going to import data through application to Temp1 table, in sql terms Insert data into
Temp1 table.
INSERT INTO [Temp1]
([ID],[Product_ID],[Market_ID],[Channel_ID],[Volume],[Period_ID],[Upgrades])
VALUES (481,656,171,51,100,36,0)
As soon the...
February 5, 2010 at 9:12 am
Sorry, the trigger is not giving the desired results I did a check
Select sum(volume) from temp1 where upgrades = 0 and period_id = 36 and product_id = 585 and market_id...
February 5, 2010 at 7:39 am
Note:As I told The update on Temp1 column can happen only on Volume column, the updates on other column Product_ID,Market_ID,Channel_ID
,Period_ID and Upgrades are not allowed.The updates can happen...
February 5, 2010 at 6:28 am
Viewing 15 posts - 1 through 15 (of 68 total)