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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combine Rows?

Status
Not open for further replies.

vb89

MIS
Aug 21, 2008
47
US
I'm trying to combine two rows under one column.

using: oracle 10g

Here is my code
Code:
select 
    cr.report_id as report_id,
    cr.report_name as report_name,
    ei.info as info
from SPSS.WEB_CLIENT_REPORTS_NFL CR,  spss.web_report_extra_info_nfl EI
where cr.report_id = ei.report_id

current output
Code:
report_id /  report_name    / info
11111        player scored      When a individual croses     
11111        player scored      the opponents end zone

what i want the output to be
Code:
report_id /  report_name    / info
11111        player scored      When a individual croses the opponents end zone

Thanks
 
I believe this is an aggregate function? Or am I totally off my rocker?
 


Yes, there is an aggregate: WS_CONCAT() [3eyes]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 


Also check: sys_connect_by_path(). [bigcheeks]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Is there any other way of doing what i stated above?
 
VB89,

There are several ways to do what you want. Two of the methods appear in thread1177-1511701.

[ul][li]Method 1: My post at 7 Nov 08 14:06.[/li]
[li]Method 2: My post at 20 Nov 08 17:09.[/li][/ul]

Simply specify the delimiter as a blank space instead of a comma.

Let us know how either of those work for you.


[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
“Beware of those that seek to protect you from harm or risk. The cost will be your freedoms and your liberty.”
 
I don't know what ws_concat is, and it doesn't seem to work in the database I'm using. I had to create my own aggregate function to do what you're talking about. You can find some info on that here

-----------------------------------------
I cannot be bought. Find leasing information at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top