IIF And UPDATE hang when trying to update 2 different column

shad0w4life

New Member
Joined
Nov 4, 2004
Messages
48
I dunno what it is but no one can seem to figure it out

I have My WORKING_TABLE with 2 Columns(A & B lets say) that are being compared to 1 column(C) in a linked table.

but it doesn't seem to be an easy task to Compare A to C and if there is a match then Column D will say "Match", if there is not a match then "No Match".

And then column E will be populated with "MAtch" and "no Match" through the same kind of comparison except it will be B compared to C


this could be done in separate queries but some of the databases will end up with 100+ queries.

I tried a few different ways but none of them worked
EG. This just updates EVERYTHING

UPDATE [06_WORKING COPY], 08_CERTS_TAG
SET [06_WORKING COPY].UIvsCERTS_Tag = IIf(
[06_WORKING COPY].[UNIQUE_IDENTIFIER]=[08_CERTS_TAG].[EQUIPNO],"UI MATCH","NO MATCH"), [06_WORKING COPY].LNvsCERTS_Tag = IIf([06_WORKING COPY].[UNIQUE_IDENTIFIER]=[08_CERTS_TAG].[EQUIPNO],"LN MATCH","NO MATCH");
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Re: IIF And UPDATE hang when trying to update 2 different co

Not exactly know which you want to solve: create the query or solve the "queries end up of some databases". I have no idea with the 2nd, but for the 1st, setup one UNION query and one SELECT query can be helpful.
 
Upvote 0

Forum statistics

Threads
1,221,842
Messages
6,162,333
Members
451,759
Latest member
damav78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top