Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with format of query results!!

Status
Not open for further replies.

LauraJM

Technical User
Feb 11, 2003
5
GB
I am trying to write a query in oracle sql, the query itself is a simple SELECT query and produces a list of results, however this list needs to be picked up and used in a front end package. I need to convert the query result list into a comma seperated string to be pulled into the front end package for further manipulation.

Is there a function or any other way to convert the list of results that a query returns into a comma seperated string.
 
Change your query so that it concatenates the results for you:

[tt]SELECT char_col1 || ',' ||
To_Char(num_col1), || ',' ||
char_col2 || ',' ||
To_Char(date_col1,'DD-MON-YYYY') || ',' ||
..... etc[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top