Add to Google Add to My Yahoo!

Live Chat Here


Articles on ASP.NET

Friday, September 21, 2007

Concatenating Columns in SQL SERVER TO SINGLE ROW . BUILDING BLOCK FOR SEARCHING


DECLARE

@temp varchar(150)

SELECT

@temp= COALESCE(@temp + ' ','' )+ varname + '' + operation + '' + varvalue +' ' + isnull (connector,'')

FROM

RuleVariables

WHERE

(RuleID = 20)

print

@temp
--
Regards,
Munish Kalra

No comments: