Muliple conditional statements in a query?

NJudson

Who farted?
Local time
Today, 18:41
Joined
Feb 14, 2002
Messages
297
I'm having a brain fart now and I'm unable to find anything that is helping me. I'm using Access 2k and I'm trying to design a create table query where I'm thinking I need multiple or nested if statments but don't know how to do them. Below is a example of the Field in the table that I'm working with:

Field1
0X
11Y
13
22Z

I'm looking for a way to replace where if Field1 contains an X as rightmost character or if Field1 is completely numeric then
Field1 Field1(new)
0X 0.1
13 13.1

If rightmost character is a "Y" then
Field1 Field1(new)
11Y 11.2

And if rightmost character is a "Z" then
Field1 Field1(new)
22Z 22.3

I'm thinking of something like an IIF statement but I have 4 conditions rather than 2. Can you nest IIF statements? I've very little experience using IIF statments but I think I understand them ok to use them. Thank you for any help.
 
Yes you can nest Iif's

iif(condition1;<true1>iif(condition2;<True2>;<False2>);<False2>))

You can nest all you want.....

Be carefull tho, it is precise work...

Regards
 
Pat,

To qoute the title of the post: "in a query?"

BR
 
Thank you both for you time and suggestions. I'll post back if I have any troubles.
 
Quantity vs Qaulity the everlasting question ... *tsk tsk tsk*

:D
 
LOL i am at work... trying to make ppl notice me.....
 

Users who are viewing this thread

Back
Top Bottom