format for SWITCH in SQL

krisleech

Registered User.
Local time
Today, 14:46
Joined
Nov 28, 2002
Messages
36
Could someone please tell me the format for the SWITCH clause in an SQL statement.
And also where the SWITCH command goes within a SQL statement.

I cant find it on the net or in Access help!

What i am trying to do is take a number and turn it into a string without changing the orignal data just for display purposes.

Many thanks Kris.
 
Last edited:
If you open a module, type SWITCH and press F1 the Access help for Switch appears.
 
SWITCH statement in SQL

Many thanks for that.

How would i incorperate SWITCH into an SQL statement?

I thought SWITCH was a native SQL clause, but it seems it is a Visual Basic function.

Kris.
 
SELECT ArmyID, Rank, Switch([Rank] = "Private", "Grunt") As NewRank FROM tblArmyPeople;
 

Users who are viewing this thread

Back
Top Bottom