Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

cursor declartion

772932Jul 18 2011 — edited Jul 18 2011
hi
friends ple through the below query can u compile this query iam new to pl/sql ple any one can help me

it is very urgent

declare
cursor r_delete_entered_renw_order is
select oola.sold_to_org_id,
hca.cust_account_id,
ha.party_name,ha.party_number,ha.party_id,
oola.flow_status_code line_f_st_c,
ooha.flow_status_code header_f_st_c,ooha.header_id,ooha.attribute1,ooha.order_number
from oe_order_lines_all oola,
hz_cust_accounts hca,
hz_parties ha,
oe_order_headers_all ooha
where oola.sold_to_org_id=hca.cust_account_id
and hca.party_id=ha.party_id
and oola.flow_status_code='ENTERED'
and oola.header_id=ooha.header_id
and ha.party_number=:p_party_number;
begin
for e in r_delete_entered_renw_order
loop
if ooha.flow_status_code='ENTERED' then
delete from oe_order_headers_all
where ooha.flow_status_code='entered'
and ooha.creation_date < sysdate:
else
dbms_output.put_line('no entered renewal order found')
end if;
end loop;
end;


and one more thing is it right or wrong ple revert me

thanks
chandra
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 15 2011
Added on Jul 18 2011
9 comments
177 views