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
 SQL Server Development (2000)
 create script

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-11-05 : 00:08:29
Iswara writes "I want update many rows in some column in some tables (i.e. col A in Table A, col B in Table B and col C in Table B) In these tables (A,B,and C) contain one column that has the same name (i.e. col S). And the answer is how can I create script to update these rows by create 'update and set' statement at once.
I've tried this below (but there's error message ORA-00971) :

update Table A a, Table B b, Table C c
set a.col A='aaaa',
b.col B='bbbb',
c.col C='cccc'
where a.col S=b.col S and
b.col S=c.col S and
a.col S='ssss';


that's it !!
Thanks for your help"
   

- Advertisement -