Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query using IIF & * 1

Status
Not open for further replies.

basement131

Technical User
Feb 23, 2004
56
CA
i am trying to create a query that changes the names of positions so that i can group them based on similarity. ie. A Sr. VP operations and a Sr. VP Human Resources are the considered the same "Senior Exec", where as the VP operations & VP Human Resources are considered "Senior Manager"

now here is what i have so far.

Position Area: IIf([Position]="GM" Or [Position]="Assistant General Manager","GM/AGM",IIf([Position]="Sr*","Senior Exec","Senior Manager"))

all is ok, except for the following
IIf([Position]="Sr*"
what i want it to do is recognize anything that begins with SR, so that i do not have to type in every position. this does not seem to work and anytime i have a SR position i get a result of "Senior Manager", where as it should result in "Senior Exec",

Now if this is not the simplest request for a early morning.

 
Position Area: IIf([Position]="GM" Or [Position]="Assistant General Manager","GM/AGM",IIf([Position] LIKE "Sr*","Senior Exec","Senior Manager"))

replacing the = with Like should do it.

Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for anyone working with databases: The Fundamentals of Relational Database Design
 
Thank you lespaul
now here is a strange thing. i could swear up & down i used that this morning and got error messages. but what i think i used was "is like" instead of just "like"
onece again thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top