dbTalk Databases Forums  

HELP: Database Record Rollup

comp.database.oracle comp.database.oracle


Discuss HELP: Database Record Rollup in the comp.database.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Marc A. Lefebvre US-775
 
Posts: n/a

Default HELP: Database Record Rollup - 08-23-2004 , 06:41 PM






I have a source database table that has the form:

ID TYPE TEXT
1 1 AAAA
2 1 BBBB
3 2 CCCC
4 2 DDDD
5 2 EEEE


And I need to output in the following form:

TYPE TEXT
1 AAAA BBBB
2 CCCC DDDD EEEE


Where the TEXT field is concatenated based on type. What SQL
statement would produce such an output?

Thanks!

Marc

Reply With Quote
  #2  
Old   
Jan
 
Posts: n/a

Default Re: HELP: Database Record Rollup - 08-24-2004 , 03:12 AM






Search for

"User-Defined Aggregate Functions", "janik (AT) pobox (DOT) sk"

in comp.databases.oracle.* for an example


lefebvre (AT) iwavesolutions (DOT) com (Marc A. Lefebvre US-775) wrote in message news:<5ef1a86c.0408231541.50a12ce6 (AT) posting (DOT) google.com>...
Quote:
I have a source database table that has the form:

ID TYPE TEXT
1 1 AAAA
2 1 BBBB
3 2 CCCC
4 2 DDDD
5 2 EEEE


And I need to output in the following form:

TYPE TEXT
1 AAAA BBBB
2 CCCC DDDD EEEE


Where the TEXT field is concatenated based on type. What SQL
statement would produce such an output?

Thanks!

Marc

Reply With Quote
  #3  
Old   
Galen Boyer
 
Posts: n/a

Default Re: HELP: Database Record Rollup - 08-24-2004 , 09:01 AM



On 23 Aug 2004, lefebvre (AT) iwavesolutions (DOT) com wrote:
Quote:
I have a source database table that has the form:

ID TYPE TEXT
1 1 AAAA
2 1 BBBB
3 2 CCCC
4 2 DDDD
5 2 EEEE


And I need to output in the following form:

TYPE TEXT
1 AAAA BBBB
2 CCCC DDDD EEEE


Where the TEXT field is concatenated based on type. What SQL
statement would produce such an output?

Thanks!

Marc
Search here:

http://asktom.oracle.com/pls/ask/f?p=4950:1:
--
Galen Boyer


Reply With Quote
  #4  
Old   
Romeo Olympia
 
Posts: n/a

Default Re: HELP: Database Record Rollup - 08-24-2004 , 09:20 AM



AskTom (http://asktom.oracle.com) has a nifty function (user-defined
aggregate actually) that you could use. Search the site for "stragg".
You could use that function as is and just replace the comma
delimiters with your required spaces instead.

Check with your Oracle version as well.

HTH.

lefebvre (AT) iwavesolutions (DOT) com (Marc A. Lefebvre US-775) wrote in message news:<5ef1a86c.0408231541.50a12ce6 (AT) posting (DOT) google.com>...
Quote:
I have a source database table that has the form:

ID TYPE TEXT
1 1 AAAA
2 1 BBBB
3 2 CCCC
4 2 DDDD
5 2 EEEE


And I need to output in the following form:

TYPE TEXT
1 AAAA BBBB
2 CCCC DDDD EEEE


Where the TEXT field is concatenated based on type. What SQL
statement would produce such an output?

Thanks!

Marc

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.