Hi All,

Table data are provided below.

Based on the country, location will be generated as

local_var_location_id := '100,200,300'

One condition is that the card_type = N then no need to check the card
details for location occurance.

If  card_type <> N then need to check the child table card details, the card
id should have all location id in the table as per the local_var_location_id
string

For example: For the above location id, card ids 1 & 2  are selected, card
id 5 should not be selected since the location id 300 is not in the card
detail table.




  CARD HEADER TABLE  CARD_ID CARD_NAME CARD_TYPE  1 C1 Y  2 C2 Y  3 C3 N  4
C4 N  5 C5 Y  6 C6 N


 CARD DETAILS TABLE  CARD_ID LOCATION_ID STATUS  1 100 A  1 200 A  1 300 A
2 100 A  2 200 A  2 300 A  2 400 A  2 500 A  2 600 A  5 100 A  5 200 A


Thanks in Advance

Deen

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to