` SQL alternative to CHOOSE (Jim Gambon ) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

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 April 28, 2024, 12:44 pm
This article has been viewed 35120 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: