Viewing 15 posts - 796 through 810 (of 897 total)
Paul White NZ (4/7/2010)
DECLARE @test-2
TABLE (
ID ...
April 7, 2010 at 4:58 am
This should work. Not tested though
DECLARE@strVariable VARCHAR(50)
UPDATEContact
SET@strVariable = Mobile,
Mobile = Office,
Office = @strVariable
April 7, 2010 at 4:40 am
Steve Jones - Editor (4/6/2010)
SSC-Insane ...
April 7, 2010 at 1:05 am
Jeff Moden (4/5/2010)
nilesh k (4/5/2010)
Delete + Insert is as per the business logic so that can not be changed.
This is such a terrible idea that I have to ask. ...
April 5, 2010 at 11:10 pm
Then i would suggest you to create a unique column and then proceed. A system generated IDENTITY column should be fine unless it breaks your existing code or procedures.
April 5, 2010 at 1:22 am
nilesh k (4/5/2010)
Delete + Insert is as per the business logic so that can not be changed.Any alternative than storing values in separate table before delete?
One more idea would be...
April 5, 2010 at 12:45 am
Inside an INSERT trigger, you will not have any data in the deleted table. Only the inserted will have data.
Why are you preferring delete + insert method over the update...
April 5, 2010 at 12:10 am
From your post it seems PostID is the primary key in table1 and foreign key in table2. If it is so you should join on PostID column.
Your code should look...
April 4, 2010 at 11:37 pm
This seems to a basic INNER JOIN query. Look for INNER JOIN in Google or Books Online. Try some code on your own and if you have any further difficulties,...
April 4, 2010 at 11:14 pm
You can do this by a simple join
UPDATET2
SETBatchid = T1.Batchid
FROMtable2 T2
INNER JOIN table1 T1
ON T2.document = T1.batchname
April 2, 2010 at 11:16 pm
Go through the below link where a similar issue was discussed
http://www.sqlservercentral.com/Forums/Topic890414-338-1.aspx
March 30, 2010 at 6:50 am
vidya_pande (3/29/2010)
If number of rows afftected(in update or...
March 29, 2010 at 4:23 am
I meant all the records that are inserted. You can have a statement that inserts 10 records or deletes 10 records at one go. Even in that case you would...
March 29, 2010 at 4:02 am
From the above code you would get either one mail or no mail at all. You will have to use a cursor or a While loop to loop through all...
March 29, 2010 at 3:29 am
Viewing 15 posts - 796 through 810 (of 897 total)