Try selecting from menu: Query, Results To, Results to Text, then execute the query. You will see the new-line corresponding to “\n”, but which is not visible in case of grid.
Json_Value get special character
hasan golshahri
21
Reputation points
Hi
declare @myfeature varchar(max) = '{"fieldterminator":",","rowterminator":"\n"}',@FeaturesForScript varchar(max)=''
set @FeaturesForScript += isnull(', FIELDTERMINATOR = ''' + JSON_VALUE(@myfeature,'$.fieldterminator') + '''','')
set @FeaturesForScript += ISNULL(',ROWTERMINATOR = ''' + JSON_VALUE(@myfeature,'$.rowterminator') + '''','')
select @FeaturesForScript
when I use "\n" the Json_Value can not get that character and this is empty
result show for me
, FIELDTERMINATOR = ',',ROWTERMINATOR = ' '
Is this Ok?