i have 4 tables in which first one i have to declare cursor(order table)
three more tables are there(adre,comp,contact) here i can not declare cursor only select statement are there .
my query is first i will perform the first table with using cursor and then i will go to rest three tables with select statement after fetching first record it will again return to the fetch cur sor and agauin check the select statement rest three tables.
please help how can i perform first fetch then perform second(where three tables are there
Joined: 14 Oct 2005 Posts: 1187 Location: Bangalore,India
I am not able to understand ur requirement...
What do u mean by fetching row from the cursor & then make some select stmt to other table then again u need toi fetch next record from the cursor(how can i perform first fetch then perform second(where three tables are there) ?
total i have four tables (eu_order,EU_company,EU_CONTACT,eu_address)
where we can fetch using cursor co_cd,BR_CD,enD_USER_ID,CONTACT_ID,
total i have four tables
level 2 (eu_contact,eu_company,eu_adress)
now these three tables are at level2 and i am using select statement for these tables(eu_company)
exec sql select end-user_id,EU_nam where end_user_id = from EU_ORDER
then again exec sql (eu_contact)contact_id,end_user_id,Contact_nam,contact_phone,Contact_email
where end_user_id = eu_order, contact_id = Eu_order
end_ser_id<eu_street-txt,eu_city_nam where end_user_id =from EU_ORDER
my query is this i will fetch first table that is Eu_order where end_user_id, is common in all four table and after fetchin dcl gen will check second and third and so on so level -1 i declare cursor and level 2 only simple select statement can u help for righting this query