Hi, Can I have the T-SQL query for the following scenario. I have the following set of 3 tables with the values and the desired output is as below : create table cars (carid int, carname varchar(100)) ; create table Styles (Styleid int, Style varchar(100)) create table carStyles (carid int, Styleid int) insert into cars values (1,'BMW'); insert into cars values (2,'Volvo'); insert into cars values (3,'Mercedes') insert into Styles values (0, 'Both'); insert into Styles values (1, 'Sedan'); insert into Styles values (2, 'Coupe') insert into carStyles values(1,0); insert into carStyles values(2,1); insert into carStyles values(2,2) insert into carStyles values(3,1) Desired output is as below: CarName Style ------- ------ BMW SEDAN BMW COUPE Volvo COUPE Volvo SEDAN Mercedes SEDAN Many Thanks. -Siva
Hi Dinakar, I am really sorry for that. I have edited the same and I have reposted it. Please can I have the reply. -Siva
Looks like this http://sql-server-performance.com/Community/forums/t/22354.aspx thread stands as duplicate! Confirm?