Hi,
Column aliases are assigned by your application in the SELECT statement, they are not held in the database. I think you can do what you want directly in your application - but perhaps I’ve misunderstood your question…
You assign an alias in your select statement, by adding an alias designation after the column being selected.
e.g. SELECT realColumnNameA “ALIAS A”, realColumnNameB, “ALIAS B”,… etc.
The aliases are defined by YOU as part of the SELECT statement and can be whatever you want (e.g. SELECT orderNumber “CUSTOMER NAME”,… makes “CUSTOMER NAME” the alias for the “orderNumber” column - this is a valid (if ridiculous) SELECT statement). In your example, you seem to be replacing the column names with the same aliases, which is unnecessary - an alias is used to replace the default column name in the results metadata, otherwise the default column name will appear anyway.
Given that you are building the SQL statement - including the aliases - in your application, there is no reason to need to get them from the database - you can just use what you already know in your application code. Have I missed something???
By the way, in SQLPlus the aliases are displayed first (as column headers) when results are returned, but they are NOT part of the results data. More technically, the column aliases form part of the metadata returned with a database result set - the SQLPlus application chooses to display them before displaying the row data.
Hope this helps.
Cheers,
Steve Ovens
#webMethods#Integration-Server-and-ESB#Adapters-and-E-Standards