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.

 All Forums
 SQL Server 2000 Forums
 MSDE (2000)
 simple sql question

Author  Topic 

isheikh
Starting Member

25 Posts

Posted - 2004-02-17 : 23:01:07
hi,

Is it possible to join two tables and update two tables in one sql statment. I am not sure about the syntax. I tried something like that butI get error

str = " update customer_ad,customer_profile set complexion ='" & complexion & "', education ='" & education & "' where profile_id=customer_id and customer_id = '" & profileid & "'"

thanks

mohdowais
Sheikh of Yak Knowledge

1456 Posts

Posted - 2004-02-18 : 00:09:48
No, you can only update one table in a JOIN. You will need to run the update twice, if necessary, using a temp table to store pre-update data.

OS
Go to Top of Page
   

- Advertisement -