Home » SQL & PL/SQL » SQL & PL/SQL » View Output Column Headers
View Output Column Headers [message #18874] Tue, 19 February 2002 17:02 Go to next message
Matt H
Messages: 4
Registered: February 2002
Junior Member
I need to output the column names as a header row from a predefined view. How can I accomplish this?

I know that I could put all the column names into a SELECT ... FROM DUAL
UNION
SELECT * FROM VIEW
but this would not be dynamic and I would have to remember to change both statements whenever I add a new column to the view.

I also know that the ALL_TAB_COLUMNS has the name of each column in the view, but each column name is a seperate record and I need to string the output across in a single record.

Any help is appreciated.
Re: View Output Column Headers [message #18886 is a reply to message #18874] Wed, 20 February 2002 01:00 Go to previous messageGo to next message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
Hi,

i do not know why u want to put the header into the view it self.because when u select the view it comes with the header.

next problem is that, u will not be able to union always because the header information is always varchar2 and your data in view may be of different kind.

cheers
pratap
Re: View Output Column Headers [message #18891 is a reply to message #18886] Wed, 20 February 2002 04:27 Go to previous message
Matt H
Messages: 4
Registered: February 2002
Junior Member
We are executing the view from a PERL script which is then outputing the data to a DAT file for an external client to pickup via FTP. The client requires that there are column headers in the output.
Previous Topic: timed_statistics
Next Topic: Can U clear up this statement on PACKAGES?
Goto Forum:
  


Current Time: Fri Sep 17 02:11:52 CDT 2021