A
anthonyd
Does the "IIf" command work if I have a number of different cases, each of
which need to call out a different result? If so, what is the syntax for it?
Is there a limit to the number of cases I might be able to have?
I am trying to enter a new column in a query called "Zone" that will
conditionally input a number based on the last 3 digits of a column called
"Zip code" in my Access query. For example, I'm trying to get the number 4 to
show up in "Zone" for all zip codes with the last 3 digits of 010-011.
Before I realized that ACCESS didn't support case-based conditions, I had
inputted the following:
Zone = CASE zip code
WHEN zip code Between LIKE *010 and LIKE *011 THEN 4
ELSE 3
END,
FROM Zone;
If ACCESS lacks this capability, is there anything else I could do? I was
considering doing an inner join, but wasn't sure how to get the query to
match just the last 3 digits of the zip code.
Any help would be greatly appreciated!
which need to call out a different result? If so, what is the syntax for it?
Is there a limit to the number of cases I might be able to have?
I am trying to enter a new column in a query called "Zone" that will
conditionally input a number based on the last 3 digits of a column called
"Zip code" in my Access query. For example, I'm trying to get the number 4 to
show up in "Zone" for all zip codes with the last 3 digits of 010-011.
Before I realized that ACCESS didn't support case-based conditions, I had
inputted the following:
Zone = CASE zip code
WHEN zip code Between LIKE *010 and LIKE *011 THEN 4
ELSE 3
END,
FROM Zone;
If ACCESS lacks this capability, is there anything else I could do? I was
considering doing an inner join, but wasn't sure how to get the query to
match just the last 3 digits of the zip code.
Any help would be greatly appreciated!