my code looks something like:
It does not return any rows.
It does return rows if I write the code as follows:
Can anyone help me with this problem?
Michael Libeson
Code:
DECLARE @var AS VARCHAR (20);
SET @var = 'A/B';
SELECT * FROM Tablename
WHERE LTRIM(RTRIM(Field)) = LTRIM(RTRIM(@var));
It does not return any rows.
It does return rows if I write the code as follows:
Code:
SELECT * FROM Tablename
WHERE LTRIM(RTRIM(Field)) = 'A/B';
Can anyone help me with this problem?
Michael Libeson