Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
Par2: SQL alternative to CHOOSE 2007-12-09 -- Jim Gambon > I know that I can use Choose to return different fields from a TPS file on a
> condition.
>
> Is there a similar functionality that will work inside a Prop:SQL(Select ...
> operation?
Check out the use of "CASE" in a Select statement. It usually works something
like this (I may not have the syntax exactly correct):
SELECT
CASE "fieldToTest"
WHEN 'A' THEN 'Blah'
WHEN 'B' THEN 'BlahBlah'
WHEN 'C' THEN 'WhoZits'
ELSE 'Nada'
END AS "ColName"
FROM "tablename"
Today is November 21, 2024, 3:28 am This article has been viewed 35221 times.
|
|