I have a SQL Server engine in which I have an entry with a filter clause. I need to get this offer is displayed for all lines except those that contain : , - , ~ .
My request:
SELECT 1
WHERE '' LIKE '%[^:-~]%'
It does not work - it shows zero lines. I also try this:
SELECT 1
WHERE 'aa:a' LIKE '%[^:-~]%'
And it shows as result 1, which is not the desired result.
Is there any way to handle this?
Note: the expression after likemust be a string that will be stored inside the table field (for exmaple: it '%[^:-~]%'will be used as LIKE x.fldFilter)
EDIT: SQL Server. . Format. , Format.
:
DECLARE @value AS VARCHAR(1000) = 'aaa:aa';
SELECT 1 FROM dbo.ParameterDefinitions X WHERE @value LIKE X.[Format];
X.[Format] '%[^:-~]%'.
, 1, , .
, 'aaa:aa' ' ', . (''), .
, '' , . , '' ?