add items to list item [message #315295] |
Mon, 21 April 2008 00:05 |
omarq
Messages: 8 Registered: May 2006
|
Junior Member |
|
|
hi..
i want to add items to the list item manually from the sql statement which can return one or more values.. the problem is when it returns more than one value.
here is the statement:
DECLARE
V_DAY NUMBER;
begin
select distinct(to_char(SESSION_DATE,'d'))
INTO V_DAY
from cs_session_agendas
where session_date between :CS_SCHEDULE_TRANSACTIONS.DATE_FROM
and :CS_SCHEDULE_TRANSACTIONS.DATE_TO
and area_id = :CS_SCHEDULE_TRANSACTIONS.area_id;
-- here the output will be the number 3 which will be added to
the list item.
Add_List_Element('DAY_LIST', 1, V_DAY, V_DAY);
EXCEPTION
WHEN TOO_MANY_ROWS THEN
????? -- here the output will be the numbers , 1, 2, 4, 5
--how can i add these to the list item?
--even i want to use loop how can i know the number of
--reputation since it is not fixed?
end;
thanks in advance....
|
|
|
|
|
Re: add items to list item [message #316266 is a reply to message #315916] |
Thu, 24 April 2008 07:24 |
sinida1984
Messages: 83 Registered: September 2007 Location: India
|
Member |
|
|
is it working now? Or else try record group.
eg:- consider below.
declare
list_id item := find_item('co_final_invoice.common_currency');
rg_name varchar2(20) := 'rg_codes';
rg_id recordgroup := find_group(rg_name);
pop_code number;
w_query varchar2(2000);
Begin
if not id_null(rg_id) then
delete_group(rg_id);
end if;
w_query := 'Select priceuom_name,code from priceuom';
rg_id := create_group_from_query(rg_name, w_query);
list_id := find_item('co_final_invoice_ted.priceuom_code');
clear_list(list_id);
pop_code := populate_group(rg_id);
populate_list(list_id, rg_id);
|
|
|
|