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
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