I have a table tickerprimaryinfo in which the column name sellerid is forign key but it may come from one of two tables useronformation or seller information.
Now i want all row from tickect information incluing name corsponding from forign sellerid.
In this situation if i join selller information table and that id from userinfomation then result gets empty set or Vise versa. hence I taken one flag for rcognize that id selller id comes from which table.
Now i have a flag which is bit value and i want to join user information or seller information according to that flag value and select rows from tickerprimaryinfo .If flag is true then join userformation otherwise join sellerinformation in ONE QUERY