Hello,
I am familiar with SQL and VB, but am new to Access. I need to update a column in a table based on a heirarchy of other field values in that same table. I can't find a syntax that works using a SQL query in Access. I have tried IIF, but it only gives me one true, false--and I need multiples. Once one is true, I am done and do not need to go on for that record. I am updating the entire table with this one query.
Here is what I need to do:
UPDATE tblL_Master SET tblL_Master.Primary_Media_Type =
If Paper_Location Like "LOST FILE*","LOST FILE"
elseif Film_Fiche_Flag Like "*FICHE*","FICHE"
elseif Image_Flag="FFI","FFI"
else if Paper_Location Like "*OTHER*","UNKNOWN"
else "PAPER"
I'd really appreciate it if anyone could tell me the correct syntax to use to get this done in one update statement.
Thanks!
Jax
I am familiar with SQL and VB, but am new to Access. I need to update a column in a table based on a heirarchy of other field values in that same table. I can't find a syntax that works using a SQL query in Access. I have tried IIF, but it only gives me one true, false--and I need multiples. Once one is true, I am done and do not need to go on for that record. I am updating the entire table with this one query.
Here is what I need to do:
UPDATE tblL_Master SET tblL_Master.Primary_Media_Type =
If Paper_Location Like "LOST FILE*","LOST FILE"
elseif Film_Fiche_Flag Like "*FICHE*","FICHE"
elseif Image_Flag="FFI","FFI"
else if Paper_Location Like "*OTHER*","UNKNOWN"
else "PAPER"
I'd really appreciate it if anyone could tell me the correct syntax to use to get this done in one update statement.
Thanks!
Jax