General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>table1.costctr needs to be converted to a new value. If have put the pseudo code below but would like to do it in an SQL statement.
>
>if table1.costctr = costctr.o_costctr and
> control.site_id = costctr.site_id
>replace table1.costctr with costctr.n_costctr
>endif
>
UPDATE Table1 SET CostCtr = CostCtr.n_CostCtr ;
WHERE Table1.CostCtr = CostCtr.o_costctr ;
AND Control.site_id = CostCtr.site_id
However, it's important to understand that that works with the values of the current records in CostCtr and Control. It's not like XBase code where you can SET RELATION and assume the tables stay in synch as you move.
Tamar
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only