SQL Syntax Error Missing Operator MS Access -
i'm trying run query update field in 1 table if field in table equal test. here code:
update table1 t1 inner join table2 t2 on t1.field1 = t2.f_name set t1.field4 = (case when t2.playfield = 'test' 'test' else 'no test' end);
however, receive syntax error (missing operator)
when run it. not sure i'm doing wrong...
since want understand issue..your sql :
update table1 t1 inner join table2 t2 on t1.field1 = t2.f_name set t1.field4 = (case when t2.playfield = 'test' 'test' else 'no test' end);
ms access doesn't support case
statement. looks sql server, not ms access.
you try:
set t1.field4 = iif([t2].[playfield]='test','test','no test');
this says: set t1.field
= if t2.playfield = 'test'
, use word 'test', if doesn't use 'no test'.
Comments
Post a Comment