October 5, 2010 at 5:22 am
when trying to ececute teh querty iam getting folloing messgae...please correct me where iam going wrong..
use tst
DECLARE @document varchar(64)
SELECT @document = 'Reflectors are vital safety ''"'' components of your bicycle.'
DECLARE @sSql varchar(64)
SET @sSql= 'SELECT';
set @sSql = @sSql + ' CASE WHEN CHARINDEX(''"'', @document) > 0 THEN ''0.0'' ELSE @document END';
EXEC @sSQL
error details ...
Msg 203, Level 16, State 2, Line 9
The name 'SELECT CASE WHEN CHARINDEX('"', @document) > 0 THEN '0.0' ELSE' is not a valid identifier.
October 5, 2010 at 5:31 am
EXEC (@sSQL)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply