IxxI
08-04-2005, 04:55 AM
I wish to select records from a recordset that have a length of 3 characters (the column is nvarchar) but I can't find a way to do it I've tried:
SELECT * FROM table WHERE row1 = 'thisval' AND datalength(row2) = 3"
and:
SELECT * FROM table WHERE row1 = 'thisval' AND datalength(rtrim((row2)) = 3"
and even:
SELECT * FROM table WHERE row1 = 'thisval' AND Length(row2) = 3"
but none of those seems to work - does anyoone know how to do this?
Thanks in advance,
IxxI
SELECT * FROM table WHERE row1 = 'thisval' AND datalength(row2) = 3"
and:
SELECT * FROM table WHERE row1 = 'thisval' AND datalength(rtrim((row2)) = 3"
and even:
SELECT * FROM table WHERE row1 = 'thisval' AND Length(row2) = 3"
but none of those seems to work - does anyoone know how to do this?
Thanks in advance,
IxxI