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.
| Author |
Topic |
|
ppuar
Starting Member
28 Posts |
Posted - 2002-10-28 : 18:01:24
|
| declare @test varchar(500)set @test = ''select sq.iSurveyId, qr.iQuestionId, qr.iResponseId, (select @test = @test + vchResponseText from response where iResponseId = qr.iResponseId) 'vchResponseDesc'from vsurveyquestion sq left join vquestionresponse qr on sq.iQuestionId = qr.iQuestionId, question qwhere sq.iSurveyId = 23 and q.iQuestionId = sq.iQuestionId and q.iQuestionTypeId <> 3 order by sq.iSurveyId, sq.siSeqNumprint @testgive the following error message:Server: Msg 170, Level 15, State 1, Line 8Line 8: Incorrect syntax near '='.I want to store all the values from the embedded select statement into one var. Does anyone know what I am doing wrong?Thanks |
|
|
ValterBorges
Master Smack Fu Yak Hacker
1429 Posts |
|
|
|
|
|