IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Yes you are.
Just kidding. But I would put those values in a table for fear that I would need to change them someday. Much quicker to change table entries than a soon-to-be-massive switch statement.

Many fears are born of stupidity and ignorance -
Which you should be feeding with rumour and generalisation.
BOfH, 2002 "Episode" 10
New Agree, but...
The way I understood the problem is that there are multiple fields that needed to be converted. Would have had to load the with many aliases to get the proper linking.

I have a table of individuals. In the positions table I have, currently only, 10 different positions. To list the "Who's responsible" list, I have to link the positions table to the names table 10 times. Can't have multiple links to the same table.

And if I understood correctly, field1, field2, ... fieldn all have values to be converted to Y/N/U.
[link|mailto:jbrabeck@attbi.com|Joe]
New Then you have one of four choices
If there are multiple fields per query, you have four choices:

1) Use Switch. This works until you get too many fields, or too many values, or change values often. Any one of those conditions makes maintenance a bear.
2) Use subqueries in the field list. This works if the number of fields stays small; the number of values can be huge and change often.
3) Store the value as text instead of a number. This increases DB size but lowers query processing time. Why have a lookup table if it's not normalizing anything?
4) Write a VBA function and call it within the SQL. Not portable.

Pick one based on your environment.

Many fears are born of stupidity and ignorance -
Which you should be feeding with rumour and generalisation.
BOfH, 2002 "Episode" 10
     'nother Access question. - (acagle) - (23)
         Tools->Relationships - (bepatient)
         Try this - (jbrabeck) - (17)
             Perfect! Thanks! -NT - (acagle)
             Ooh...I like that... - (bepatient) - (15)
                 Guess I aint as bad as I thought! - (jbrabeck) - (14)
                     Been a while since I used Access, but. - (mmoffitt) - (10)
                         Case statement - (orion) - (9)
                             Not that one. - (mmoffitt) - (8)
                                 SQL construct - (ChrisR) - (7)
                                     Still there but only for two options -NT - (tseliot)
                                     Yeah, I was thinking Access had a TSQL-like Case statement. - (mmoffitt) - (5)
                                         IIRC the queries do support it. - (ChrisR)
                                         Yes Access has a Case statement - (jbrabeck) - (3)
                                             Yeah, I remember IIF in Access. - (mmoffitt) - (2)
                                                 DECODE would do it, if Access has it, that is. - (Meerkat) - (1)
                                                     IIF, Case and Switch. No Decode - (jbrabeck)
                     Yes you are. - (tseliot) - (2)
                         Agree, but... - (jbrabeck) - (1)
                             Then you have one of four choices - (tseliot)
         Okay, here's another one: - (acagle) - (1)
             ="A" & Chr(13) & Chr(10) & "B" - (ChrisR)
         Does the Tab key have any special meaning to it? - (acagle) - (1)
             Check the properties - (jbrabeck)

It is a silly place.
85 ms