I need to write a select query by nvarchar. For instance the query so far looks like this:
SELECT * FROM Reservations.BlockResource WHERE Reason LIKE '%'+ @Reason+ '%'
However the problem is that the reason might have multiple whitespaces since it is nvarchar. If the @Reason='Blocked for John Doe. He is coming at 5pm', the query works. But if @Reason='Blocked for John Doe. He is coming at______5pm', the query wont work cause of the multiple spaces between words.
I would really appreciate if someone could share a workaround for this issue.
Thank you in advance
PS: Replacing the white spaces is not a solution since I don't know the number of spaces between words.