tags:

views:

43

answers:

1

I want to use column aliases while selecting the column in an informix database table. For example in the following query:

SELECT hire_dt as "Hire Date" FROM employee

Column hire_dt should be displayed as Hire Date. How can I do this in informix?

+1  A: 

This is fine as long as you have the DELIMIDENT environment variable set. Read up about it in the documentation.

fredley
Be cautious about adding DELIMIDENT to an environment not used to it; queries that used to work can fail because programmers used double quotes around strings - but those become (case-sensitive) identifiers when DELIMIDENT is set.
Jonathan Leffler
Agreed, DELIMIDENT should be avoided at all costs, apart from anything it breaks replication amongst other things...
fredley
Thanks fredley and Jonathan