Guys, good afternoon.
I would like to give a Select on a table, and the result of the column be her name?
Ex:
Table Cars (1 line)
Description COD
001 monza
(today leaves):
Select Cod, description and from cars
COD description
001 monza
99] (I would like this):
Select Cod, description from cars
COD monza
001 monza
Thank you.
embrace,
Column Name in Select :: Change
- dr_gori
- Moderador
- Posts: 5024
- Joined: Mon, 03 May 2004 3:08 pm
- Location: Portland, OR USA
- Contact:
Thomas F. G
Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered
Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered
Why do you want this?
And if the table has two lines? (Monza and Fusca) How would the name be?
I did not understand ..: roll:
And if the table has two lines? (Monza and Fusca) How would the name be?
I did not understand ..: roll:
The only way I know of doing something similar is with hash table where the index name could be equal to the value of the index
what you could do was create something dynamic and pass something like the execute immediate and ride the string of sql and pass a variable with the nickname of the column ... dae when you run the name will be that ... but also I do not know if it works .... the version of the Oracle I have At the moment does not support the Immediate execute ... otherwise I would try to make an example ... but if you want to see how it works,
http://www.oracle.com/technology/docume ... h_901.html
Low the PL / SQL guide and Take a look at the Dynamic SQL part .... I think it will help you ...
[] 's
what you could do was create something dynamic and pass something like the execute immediate and ride the string of sql and pass a variable with the nickname of the column ... dae when you run the name will be that ... but also I do not know if it works .... the version of the Oracle I have At the moment does not support the Immediate execute ... otherwise I would try to make an example ... but if you want to see how it works,
http://www.oracle.com/technology/docume ... h_901.html
Low the PL / SQL guide and Take a look at the Dynamic SQL part .... I think it will help you ...
[] 's
-
- Information
-
Who is online
Users browsing this forum: No registered users and 10 guests