Does anyone know how to select a series of records into one field in a query. I have a one to many relationship, and I want to retrive all of the many's into one field for a report.
You can't do such a thing!
use something like this (this is a pl/sql solution)
declare
TYPE generic_curtype IS REF CURSOR;
my_cursor generic_curtype;
rate_unit_cr_cursor_row number;
v varchar2(10):='';
begin
open my_cursor for
select * from test1;
loop
exit when my_cursor%notfound;
fetch my_cursor into rate_unit_cr_cursor_row;
v:=v||to_char(rate_unit_cr_cursor_row);
end loop;
close my_cursor;
dbms_output.put_line(v);
end;
it is a cursor that will do the trick...
Good luck!
I have three tables day, vendors, and dayVendors, linking the the vendors to the days. I would like to report all the vendors that supply each day as one record:
Day1 - vendor x, vendor y, vendor z
Day2 - vendor x, vendor a, vendor b
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.