1

I have a table USER_INFO which contains a column name buyer_id . This column contains all buyers id for another table name BUYER. Unfortunately this buyer_id column contains all the id as comma separated list e.g for

user_id = 1  -> buyer_id = 4,8,6,7 
user_id = 2  -> buyer_id = 12,4 
user_id = 3  -> buyer_id = 1,8,9

I simply want to extract the data from BUYER table with buyer_id present in USER_INFO table but as data in that column is present in the form of a list i am unable to join this table with BUYER table so that i can show the data from that table based upon each buyer id present in table. Can any one help me to get each separate buyer id so that i can simply show the rest of BUYER detail based on that buyer_id. Just want to get some thing like this e.g

for user_id = 1 -> buyer_id = 4,8,6,7 , i want to show rest of data from BUYER table for all buyer_id = 4, buyer_id = 8, buyer_id = 6, buyer_id = 7 (as given in the buyer_id list in USER_INFO table) Need the quick solution , Hope anyone will answer , Thanks in advance

Rahul Gupta
  • 991
  • 4
  • 12

0 Answers0