I am trying to write a query in Create Variable and facing issue with special characters

0
My Query:  Select * from abc where  id LIKE ('%Abc%')   I was wanting in this format. 'Select Top 1 Payload from dbo.T_NDG_RestAdaptorRequestLog  where PAYLOAD Like' +  ‘%Abc%'  + 'Order by StartTime desc'   where Abc would be an object of Entity. a dynamic value.
asked
2 answers
0
'SELECT TOP 1 l.Payload FROM dbo.T_NDG_RestAdaptorRequestLog l' + '
WHERE l.Payload LIKE ''' + $Entity/Attribute + '' + '
ORDER BY l.StartTime desc;'

 

answered
0

Hi,

Have you tried something like this :

SELECT * FROM ABC where id like ‘%[Abc]%’

answered