This is Microsoft SQL Server Query, can SAS SQL can do something like this?
SELECT ProductNumber, Name, 'Price Range' =
WHEN ListPrice = 0 THEN 'Mfg item - not for resale'
WHEN ListPrice < 50 THEN 'Under $50'
WHEN ListPrice >= 50 and ListPrice < 250 THEN 'Under $250'
WHEN ListPrice >= 250 and ListPrice < 1000 THEN 'Under $1000'
ELSE 'Over $1000'
ORDER BY ProductNumber ;
I believe the CASE clause is ANSI standard SQL. PROC SQL (the SAS implementation of SQL) does support use of the CASE clause. For more help on SAS and PROC SQL and the CASE clause, you might look in the PROC SQL documentation or consult with Tech Support for more help.