Link to home
Start Free TrialLog in
Avatar of wfluisi
wfluisi

asked on

Select query results are incorrect - characters being ignored

I have been fighting with this query for some time, it seems that the select is ignoring the last 4 characters in the statement below. Instead of returning the matching record it returns the first record beginning with 1234567890098765

SELECT * from  table where table.sim = 12345678900987654321

When I test the same logic on another database field with a smaller (in length) variable, the information is correct - so I know my syntax is correct.

So the question is - How can I perform a select on a field where its length is 20 characters?

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of BrandonGalderisi
BrandonGalderisi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Guy Hengel [angelIII / a3]
is the field CHAR, by any chance?
Avatar of wfluisi
wfluisi

ASKER

Thanks BrandonGladerisi - you nailed it on the head!