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

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -