General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>Thanks Jay! The results are exactly as I wanted!
>
>>>Max --
>
>>>You need to add a SQL 89 join condition to the UPDATE to join the table and >>temporary query together, as follows:
>
>
>>>SELECT emp_name, commission, rptdate ;
>>> FROM Table1 INNER JOIN Table2 ;
>>> ON Table1.emp_name = Table2.emp_name;
>>> WHERE Table1.rptdate = Table2.rptdate;
>>> ORDER BY Table1.emp_name;
>>> into cursor crsTemp
>
>>>UPDATE Table2 SET Table2.commission = crsTemp.commission ;
>>> WHERE Table1.emp_name = Table2.emp_name;
>>> AND Table1.rptdate = Table2.rptdate
>
>
>>>Jay
Glad that worked! I've got a headache today, and have a bit of tunnel vision. As Robert mentioned, the UPDATE as shown above should work by itself without the intermediate query.
Jay
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