Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Not sure how to write this in sql
Chris,
Can you do it in PL/SQL using dbms_utilty.comma_to_table and = dbms_utility.table_to_comma to get/insert data in your table? Or maybe = do some bulk processing in PL/SQL?
--
Ron Reidy
Lead DBA
Array BioPharma, Inc.
-----Original Message-----
From: oracle-l-bounce_at_freelists.org on behalf of Chris Stephens Sent: Wed 1/12/2005 2:51 PM To: oracle-l_at_freelists.org Cc:=09 Subject: Not sure how to write this in sqlWe have a function that loops through a table and grabs all rows associated with a particular id and builds a string consisting of a comma delimited, concatenate string of 1-3 rows of a column associated with that id.
the function returns the string and that string is used to populate a column in another table.
i believe this is possible in a single update statement but i can't figure out how to right it. (as it is, it takes over an hour)
so:
table a
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
id col2
1 a
1 b
1 c
should populate table b like
table b
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
id col2
1 1,2,3
table a can have 0,1,2, or 3 rows associated with each id.
help?
ps. I have lex's book on order so hopefully my sql skills will continue to grow.
tia
chris
--
http://www.freelists.org/webpage/oracle-l
This electronic message transmission is a PRIVATE communication which =
contains
information which may be confidential or privileged. The information is =
intended=20
to be for the use of the individual or entity named above. If you are =
not the=20
intended recipient, please be aware that any disclosure, copying, =
distribution=20
or use of the contents of this information is prohibited. Please notify =
the
sender of the delivery error by replying to this message, or notify us =
by
telephone (877-633-2436, ext. 0), and then delete it from your system.
--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jan 12 2005 - 16:04:13 CST
![]() |
![]() |