Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

format for SWITCH command

0 views
Skip to first unread message

kris leech

unread,
Mar 14, 2003, 11:45:05 AM3/14/03
to
Can someone please tell me the format for the SQL SWITCH command.
I want to turn the returned integer value 1 into a string, 2 into another
string etc..
I searched google and all I get is info about switching from Access to SQL
:(


Many thanks Kris.


Jim K

unread,
Mar 14, 2003, 12:30:01 PM3/14/03
to
Here's the example from Access help (opened in an
Access 'Module'):

Function MatchUp (CityName As String)
Matchup = Switch(CityName = "London", "English",
CityName = "Rome", "Italian", CityName = "Paris", "French")
End Function

>.
>

kris leech

unread,
Mar 17, 2003, 7:06:59 AM3/17/03
to
Many thanks Jim.
If the switch was in an SQL statement where would it be, after which clause?


--
UK Website Solutions, Advice, Articles and News @ http://www.phizzie.com

"Jim K" <ken...@gimail.af.mil> wrote in message
news:043601c2ea4f$57faded0$3301...@phx.gbl...

Duane H

unread,
Mar 17, 2003, 1:31:02 PM3/17/03
to
Select Switch([FldA]=1,"One", [FldA]=2,"Two") As FieldA, ...

If you have small integer values, you might find the Choose function easier
to use:
Select Choose([FldA],"One", "Two") As FieldA, ...


--
Duane Hookom
MS Access MVP


"kris leech" <kris...@email.com> wrote in message
news:b54dp2$7lu$1...@helle.btinternet.com...


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.462 / Virus Database: 261 - Release Date: 3/13/2003


kris leech

unread,
Mar 30, 2003, 4:31:08 PM3/30/03
to
Thanks, thats spot on advice for what i need to do :)
kris.

--
UK Website Solutions, Advice, Articles and News @ http://www.phizzie.com

"Duane H" <duane...@hotmail.com> wrote in message
news:uD4ofNL7...@TK2MSFTNGP12.phx.gbl...

0 new messages