$CASE or $SELECT Analog in Cache´SQL
Hi, folks!
Is there any way to use $CASE or $SELECT functionality in SQL SELECT query?
E.g. something like this:
SELECT product, $CASE(status,"New":field1,"Payed":field2) as data from sales
To see either in data column either field1 or field2 values in regard of status value.
Evgeny,
in SQL you have a CASE ... END block for selection
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...
Thanks Robert, Lukas, that is what I'm looking for.