I have a stored procedure which accepts @reason as an incoming string parameter, but for the purposes of this post, I declred @reason manually, and assigned it some test values. In the stored procedure, we use a function "CreateStringTable", which accepts a string of comma separated values, and returns them as a column in a table.
To avoid confusion, the query above can be seen as:
select *from Transactions twhere t.UserReason in (select columnA from TableA)
How do I do a case-sensitive search of this? In other words, if columnA only contains the word 'Test', and t.UserReason contains only the word 'test', no records should be returned.
Microsoft SQL ServerMicrosoft SQL Server 2008
Last Comment
pzozulka
8/22/2022 - Mon
Éric Moreau
you can use a Case-Sensitive collation:
Select * from a_table where attribute = 'k' COLLATE Latin1_General_CS_AS
Open in new window