I need help re-writing a query.
When accessing DB2 I can execute the below:
delete from DM_KOHLS.clr_plan_price_change_metrics A
where A.start_dt>= Date( '05/15/2005' ) and
exists ( select * from SESSION.delete_table_tmp B
where A.clr_plan_sk = B.clr_plan_sk)
I modified it to be what I thought was a valid MySQL statement but when I
execute it against MySQL I get a syntax error:
ERROR: Execute error: You have an error in your SQL syntax. Check the manual
that corresponds
to your MySQL server version for the right syntax to use near 'exists (
select * from
delete_table_tmp where clr_plan_price_ch
The statement I executed is:
delete from clr_plan_price_change_metrics
where start_dt>= '2005-05-15' and
exists ( select * from delete_table_tmp
where clr_plan_price_change_metrics.clr_plan_sk =
delete_table_tmp.clr_plan_sk)
I can successfully execute each piece of the query, but when I combine it with
the 'exists' subquery it fails.
The examples in the doc show just selects... Exists() so I tried changing it to
a select from table and still fails. What is the correct syntax?
-Barb.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]