Hi,
I need to update a column value in a table based on values from a Other 2 tables.
I was able to write a update statement to achieve this:
update T3 set col=T1.x from T1,T2,T3 where ...
This takes lot of time since the table T3 has more than million records.
I would like to get the value v1 from T1 and loop over them and get corresponding value for v1 from t2 as v2 and use v2 to update all records where colx=v1;
.
How do i use loop to perform select , get value and then do update in sql?
I use sybase db.
Thanks.