Monday, 15 September 2014

sql - MISSING RIGHT PARENTHESIS ERROR WITH PARENTHESIS CORRECT -



sql - MISSING RIGHT PARENTHESIS ERROR WITH PARENTHESIS CORRECT -

i running sql query , have 2 parenthesis still error "missing parenthesis". code shown below:

update alekwe_customer c set recently_purchased = case when exists(select * alekwe_customer_product d c.customer_id=d.customer_id) 'y' else 'n' end;

if sql-server, might answer:

update alekwe_customer set recently_purchased = (case when exists( select * alekwe_customer_product d customer_id=d.customer_id) 'y' else 'n' end);

you need set whole case construction in parentheses too. next that, can't utilize alias table updated.

sql oracle

No comments:

Post a Comment