7.3 Giving a SELECT CASE statement an explicit column name? 
Author Message
 7.3 Giving a SELECT CASE statement an explicit column name?
How do I assign an explicit column name to the result of a case
statement in a SELECT CASE statement?

Thanks!



Mon, 14 Jun 2004 19:51:05 GMT
 7.3 Giving a SELECT CASE statement an explicit column name?

Quote:

> How do I assign an explicit column name to the result of a case
> statement in a SELECT CASE statement?

> Thanks!

select
        case when tabid < 100 then "system table" else "user table" end
table_type,
        tabname
from
        systables;

--
**************************************************************

Orbis                       Tel: +44 208 742 1600
http://www.OrbisUK.com      Fax: +44 208 742 2649



Mon, 14 Jun 2004 21:22:28 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Using column number inplace of column name in SQL Select statement

2. Using a Variable as Column name in Select statement in a Cursor

3. Getting column name in Select statement

4. Column Name Formating logic in select statement

5. how to get column names given table name through sql query

6. select * statement to return only column names?

7. Returning column names is a select statement

8. Oracle 7.3 table/columns name syntax

9. xml explicit and a column name

10. Case Statement Dependent On Another Case Statement Possible?

11. Selecting all columns, but in a different order in SELECT statement

12. Nested Select (returning columns from inner select statement)


 
Powered by phpBB® Forum Software