Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
dyckwal
Yak Posting Veteran
58 Posts |
Posted - 2005-11-03 : 05:27:13
|
| Hello,I know that cursor are not performing etc. But it is the only thing that works for me..But I have a problem. When using the code below and when we have more than two records updated, I always get double number of records.If 2 then the cursors seems to have 4, when 3 then it holds 6 etc...Can someone explain this to me?? Please DECLARE CursorSSCCInbound CURSOR FORSELECT i.Item_Code,i.SSCC, i.Units,i.ID_Location, i.Status, i.Locked_Nbr,i.ID_Shipment, i.ID_Shipment_Out, d.ID_Location, d.Status, d.Locked_NbrFROM INSERTED i LEFT OUTER JOIN DELETED d ON i.SSCC = d.SSCC |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2005-11-03 : 08:22:57
|
| is SSCC a unique index on the table?Is the trigger being fired twice?==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
dyckwal
Yak Posting Veteran
58 Posts |
Posted - 2005-11-03 : 08:29:12
|
| Yes the SSCC is a unique key and how do I check to see if the trigger is fired twice ? |
 |
|
|
dyckwal
Yak Posting Veteran
58 Posts |
Posted - 2005-11-03 : 10:29:58
|
| I found my problem, and the solution.Thanks |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-11-04 : 01:18:47
|
| What is the solution?MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|
|