RSS Forums RSS
Please support our MS SQL advertiser: Programming Forums
Views: 3344 | Replies: 1
Join Date: May 2007
Posts: 1
Reputation: rchokler is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
rchokler rchokler is offline Offline
Newbie Poster

update two rows in one query

  #1  
May 13th, 2007
UPDATE table1
SET ID,[DESC] =
(SELECT ID,[DESC]
FROM tmptable
WHERE tmptable.ID_SUN = table1.ID_SUN)
WHEREEXISTS
( SELECT ID,[DESC]
FROM tmptable
WHERE tmptable.ID_SUN = [Table1].ID_SUN)
I tired this but i coudn't uptade tow columns at once
do i need to seperate them or i have any mistake?
AddThis Social Bookmark Button
Reply With Quote  

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
All times are GMT -4. The time now is 12:44 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC