Re: DECODE equivalent
From: MGFoster (me_at_privacy.com)
Date: 04/29/04
- Next message: MarkD: "Q: Appending crosstab query having dynamic variables"
- Previous message: bob: "forum input field"
- In reply to: patricia: "DECODE equivalent"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 29 Apr 2004 20:41:04 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The Switch() function works similarily:
SELECT Switch(State In ("NY","NJ"), "A", State="CT", "B", State Not In
("NY", "NJ", "CT"), "C")
-- MGFoster:::mgf00 <at> earthlink <decimal-point> net Oakland, CA (USA) -----BEGIN PGP SIGNATURE----- Version: PGP for Personal Privacy 5.0 Charset: noconv iQA/AwUBQJFoZIechKqOuFEgEQIJwwCgzgGVkUaHgueINySQcBL1LQdEyqEAoJzI WOOY3iJ2muzeqAK2fTNPOn/5 =jkNF -----END PGP SIGNATURE----- patricia wrote: > I am using Microsoft Access 2000 and want to do a group > by, but need to consolidate values in the column. > e.g. 'A' means STATE = NY or NJ; 'B' means STATE = > CT; 'C' for all other states. > > Is there a function similar to Oracle's DECODE? e.g., > SELECT DECODE(STATE, 'NY', 'A', 'NJ', 'A', 'CT', '2', '3') > > Where could I find a list of valid FUNCTIONS (SQL, not > WORK***). Just fishing around I find ones that work > (like STR), but cannot find any details in Microsoft > Access Help. Thank You!
- Next message: MarkD: "Q: Appending crosstab query having dynamic variables"
- Previous message: bob: "forum input field"
- In reply to: patricia: "DECODE equivalent"
- Messages sorted by: [ date ] [ thread ]