niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » Oracle » Tools
SQLPLUS - rollup concatenation question
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
Author Message
Andy Hassall
*nix forums Guru


Joined: 20 Feb 2005
Posts: 874

PostPosted: Sat Feb 12, 2005 10:52 am    Post subject: Re: SQLPLUS - rollup concatenation question Reply with quote

On Fri, 11 Feb 2005 16:16:25 -0600, "Dan Levy" <Dee-Arr-Levy@lucent.com> wrote:

Quote:
A query of the kind brains of the group.

Is there any function available in sqlplus that will allow the concatenation
rollup of a textual field with an SQL query.

And if available, what is the earliest version of Oracle that this will work
on.

For example this would look like

Mytable

A B
---+---
ape bug
ape dog
ape man
cat rat
cat dog

select concatenationrollup(A,B,';') from Mytable;

A B
--- ---
ape bug;dog;man
cat dog;rat

Not with that exact syntax, but close; you need a user-defined aggregation
function, and a "group by A". Go to http://asktom.oracle.com and search for
"STRAGG" - 9i or later.

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Back to top
DA Morgan
*nix forums Guru


Joined: 06 Mar 2005
Posts: 1042

PostPosted: Fri Feb 11, 2005 10:44 pm    Post subject: Re: SQLPLUS - rollup concatenation question Reply with quote

Dan Levy wrote:

Quote:
A query of the kind brains of the group.

Is there any function available in sqlplus that will allow the concatenation
rollup of a textual field with an SQL query.

And if available, what is the earliest version of Oracle that this will work
on.

For example this would look like

Mytable

A B
---+---
ape bug
ape dog
ape man
cat rat
cat dog

select concatenationrollup(A,B,';') from Mytable;

A B
--- ---
ape bug;dog;man
cat dog;rat

Thanks in advance
Dan

If replying by email please use
drlevy@glowing.com (replace "glowing" with "lucent")

No. You will need to use PL/SQL.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)
Back to top
Dan Levy
*nix forums beginner


Joined: 11 Feb 2005
Posts: 1

PostPosted: Fri Feb 11, 2005 9:16 pm    Post subject: SQLPLUS - rollup concatenation question Reply with quote

A query of the kind brains of the group.

Is there any function available in sqlplus that will allow the concatenation
rollup of a textual field with an SQL query.

And if available, what is the earliest version of Oracle that this will work
on.

For example this would look like

Mytable

A B
---+---
ape bug
ape dog
ape man
cat rat
cat dog

select concatenationrollup(A,B,';') from Mytable;

A B
--- ---
ape bug;dog;man
cat dog;rat

Thanks in advance
Dan

If replying by email please use
drlevy@glowing.com (replace "glowing" with "lucent")
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
The time now is Thu Jan 08, 2009 12:28 am | All times are GMT
navigation Forum index » Databases » Oracle » Tools
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Newbie question: How to forward a domain to a mailbox? leei Postfix 0 Fri Aug 24, 2007 4:55 pm
No new posts configuration question for httpd Karl Wang Apache 1 Fri Jul 21, 2006 2:10 pm
No new posts nim problem/question Ron AIX 0 Fri Jul 21, 2006 1:57 pm
No new posts question for JAVA developer who r using postgres sql as b... deepak pal PostgreSQL 1 Fri Jul 21, 2006 9:00 am
No new posts Encryption Question dtuttle1@gmail.com Berkeley DB 2 Thu Jul 20, 2006 10:09 pm

Myspace Generators | Repair Bad Credit | Web Advertising | Loans | Debt Consolidation
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.2159s ][ Queries: 20 (0.1196s) ][ GZIP on - Debug on ]