I m writing storeprocedure in sQL server2008
in that i m executing following query.
Declare @sqlCommand varchar(1000)
SET @sqlCommand = 'SELECT distinct CompanyName + i.Industry
+ Servicename + [Busi_Description]
+ [Business] FROM dbo.[BusinessAssociate] b,dbo.Industrymaster i,ServiceMaster
WHERE industryid=b.industry and serviceid=product '
it works fine but when i m concatenating it with \n then it doesnt give result.
concatenating \n query is
SET @sqlCommand = 'SELECT distinct CompanyName' + '\n' + 'i.Industry' + '\n'
+ 'Servicename' + '\n' + '[Busi_Description]' + '\n'
+ '[Business] FROM dbo.[BusinessAssociate] b,dbo.Industrymaster i,ServiceMaster
WHERE industryid=b.industry and serviceid=product'
i think its Single quote completion problem
plz help me to solve this
...
Go to the complete details ...