Hi, Im trying to build some sql through string concatenation can someone take a look, im having problems with quotes.
Its the third line im having trouble with.Code:set @SQL = @SQL + 'CASE owner_ein ' set @SQL = @SQL + 'WHEN ''NA'' THEN ''Unassigned'' ' set @SQL = @SQL + 'else ''''<a target=''_blank'' href=''http://url?ein='' + ein + ''''>'' + LEFT(firstname, 1) + ''. '' + surname + ''</a>'' AS name''' set @SQL = @SQL + 'END as name '




Reply With Quote