Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I use an IF command in a SELECT statement using SQLScope?

SCRIPTS

How do I use an IF command in a SELECT statement using SQLScope?

by  handlewithcare  Posted    (Edited  )
It would appear that SQLScope has no IF or CASE commands. After much searching I found that the following statement can be used to solve this problem;

SELECT (if_statement ?? then_condition :: else_condition) AS dataresult FROM datafile

Example:
SELECT (field > 1000 ?? 'large' :: 'small') AS dataresult FROM datafile

I hope this will be of use to someone...

Richard
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top