Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Merging results

Re: Merging results

From: Andreas Jung <ajung_at_sz-sb.de>
Date: Tue, 27 Jun 2000 20:21:05 +0200
Message-Id: <10541.110566@fatcity.com>


On Tue, Jun 27, 2000 at 11:12:59AM -0700, Chuck Hamilton wrote:
>
> I'm not sure what you mean. If you mean you want to append a | to all rows the answer is simple...
>
> select docnum||'|' from ...;
>
> If you mean you want a new column for each row returned there is no way to do it in SQL without first knowing the number of rows being converted into columns. I think something like that would best be handled with a spreadsheet. You could probably do it in Unix too by piping the results of the query through awk and/or sed to build in "insert" or "create table as select... from dual" statement.

The user makes a search and gets a list document numbers as result. I need to store all document numbers from the query. When the user gets 100000 hits it is more efficient to store ale document numbers as one string in one column instead of storing in 100000 rows in a result table.. thats's the background. Received on Tue Jun 27 2000 - 13:21:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US