I have 2 tables in sql table 1- ContributerSubCategoryMapping ID Subcatid ContributorID LocationId 1 1 2 379 2 2 2 379 3 4 3 379 4 32 2 379 5 41 2 379 6 45 2 379 7 4 412 379 8 5 412 379 9 41 408 1328 10 45 408 1328 11 4 3 1328 12 6 4 1328 13 7 7 1328 Table 2 - PhotographerContributors_tbl ContributorId Pswd FirstName LastName 1 123 Ravi asdddd 2 456 Deepak dddd 3 789 ramesh asd 4 876 Parveen sad 5 234 Sandeep asda I have create a join below
select PhotographerContributors_tbl.* , tbl_City.City as Cityname from ContributerSubCategoryMapping left outer join PhotographerContributors_tbl on PhotographerContributors_tbl.ContributorId=ContributerSubCategoryMapping.ContributorID left outer join tbl_City on tbl_City.CityID=ContributerSubCategoryMapping.LocationId where ContributerSubCategoryMapping.Subcatid in (1,2,3,4,5,6,7)
select Distinct name1...
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)