"The set strikes me as something like the set of potatoes, radishes, farming, and lunch. " - a colleague's way of comparing both overlapping and disparate groups. made me laugh and thought of the ranch
I have create 3 master table which are Address_mst,Addr_typ_mst,Name_mst.
a) In addr_typ_mst there are two column name (1. Id and 2. Addr_typ ).
The first id for addr_typ_mst is (101) and addr_typ is (Residence).
The second id for addr_typ_mst is (102) and addr_typ is (Office).
b) In Name_mst there are two column name (1. Id and 2. Name ).
The first id for name_mst is (21) and name is (Sapan).
The second id for name_mst is (22) and name is (Umans).
c) In address_mst there are four column name (1. Id , 2. Addr_typ_idn , 3. Name_id and 4. Address_name ).
The first id for address_mst is (1) , addr_typ_idn for address_mst is (102) ,name_id for address_mst is (21) and address_name for address_mst is (Paras Nagar).
The second id for address_mst is (2) , addr_typ_idn for address_mst is (102) ,name_id for address_mst is (21) and address_name for address_mst is (G.K.Nagar).
Now i want to get the data in the format of.
Column Name should be (Sr.No,Name,Office1,Office2) and the below
row-data should be (1,Sapan,Paras Nagar,G.K.Nagar)
What I don't understand is the join pattern. I see your specific example, but that doesn't necessarily say what you want to do.
For example, you want the result to contain the columns:
Sr.No - what is this?
Name - The first id in name_mst?
Office1 - all matching entries in address_mst?
Office2
"The set strikes me as something like the set of potatoes, radishes, farming, and lunch. " - a colleague's way of comparing both overlapping and disparate groups. made me laugh and thought of the ranch
Ah. Now I understand; you want to pivot the results. See this Ask Tom entry for how to do so in Oracle. It uses Oracle specific functions, but maybe mySql has similar ones.
"The set strikes me as something like the set of potatoes, radishes, farming, and lunch. " - a colleague's way of comparing both overlapping and disparate groups. made me laugh and thought of the ranch