September 16, 2015 at 1:28 am
Hi All,
how to use Contains function on sql parameters?
If Sql parameter has space then its not working else working.
e.g
If @searchParam='serachtext' then its working but if its @searchParam='serach text' then not working
kindly provide solution.
Thanx
September 16, 2015 at 6:37 am
Could you give more information?
How about sample data so we can reproduce what you're trying to do?
September 16, 2015 at 3:31 pm
Something like this?
DECLARE @searchParam VARCHAR(100);
SET @searchParam = 'search text';
IF @searchParam LIKE '% %'
BEGIN
PRINT 'Not Working'
END
ELSE
BEGIN
PRINT 'Working'
END;
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply