Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
When is run this QuerySelect PhotoName,photoName1,photoName2,photoName3 from BusinessProfilePhoto where BusinessProfileID in (Select CategoryName,SubCategoryName from CreateAdCategory where BusinessProfileID in(Select BusinessProfileID from BusinessProfile where CountryID=7 and StateProvinceID=53))I Get Error message Msg 116, Level 16, State 1, Line 1Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.what is problem is any alternate for this query Vijayaraya
visakh16
Very Important crosS Applying yaK Herder
52326 Posts
Posted - 2008-08-18 : 06:04:39
may be this
Select bpp.PhotoName,bpp.photoName1,bpp.photoName2,bpp.photoName3 from BusinessProfilePhoto bppjoin CreateAdCategory cadon bpp.BusinessProfileID=cad.BusinessProfileIDjoin BusinessProfile bpon bp.BusinessProfileID=cad.BusinessProfileIDand bp.CountryID=7 and bp.StateProvinceID=53