Actually - now a few days on I've found a further solution which
involves a bit of both.  One thing to point out is that the
application that uses the SQL can replace the code [FILTER] with the
internal ID of the object your looking up that makes this a bit
easier.

Here I go - in my system we have objects of type A or B - the query
could be passed either of these objects.

 SELECT Info1,Info2 FROM Table1
 WHERE Table1.ID = '[FILTER_CODE]'
 AND type='A'
 )
 UNION
 SELECT Info1,Info2 FROM Table2
 WHERE Table2.ID = '[FILTER_CODE]'
 AND type='B'

As the object can only ever be one type and this is either A or B - if
the object is A , the query returns the first results, if it is type B
then it is the second results.

Hope this makes sense
--~--~---------~--~----~------------~-------~--~----~
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