Make Table Query

mlopes1

Registered User.
Local time
Today, 06:20
Joined
Sep 4, 2002
Messages
76
I am trying to use a Make Table Query. Its based on table 1. It takes 3 fields from table 1. Now I want to create a 4th field that is based on one of the first three. Field1 is ID, Field2 is Name, and Field3 is Height. I want to create a field4 called Category. Category should = NA if Name = "John", = IM if Name ="Pete".

I added this code to the field in Query Design:

Category: Switch([Name] = "John", "NA", [Name] = "Pete", "IM")

When I try to run the query, I am told I have a data type error.

What am I missing here?

Thank you,

Marco
 
In case anyone was wondering what my error was:

I needed to add a Like in there because i was searching for a partial string...

Category: Switch([NAME] Like "*MIKE*","NA")
 

Users who are viewing this thread

Back
Top Bottom