IIf function to make a country code

Dave_epic

Registered User.
Local time
Today, 17:11
Joined
Mar 6, 2008
Messages
39
hi

I have a table with a column [countries] ie England, Scotland, Wales. I was trying to write SQL to make a new column with just a code for the country. So all occurences of England would be 1, Scotland would be 2 etc.

I suppose I could duplicate the column and run an update query. But I'd rather use the IIF function. something like :

IIf([Country] = “England”, “1”) As CountryCode

Not working though, any ideas?

Thanks
 

Users who are viewing this thread

Back
Top Bottom