Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Eliminating Spaces in a Query

Status
Not open for further replies.

snoopy92211

Technical User
Jun 29, 2004
67
US
Hello.

I have a query, in which i'm trying to select a company number that has the value of 'x'. But since the file specs for this particular field has a text value of 20. I tried using trim for this query, to pick out the spaces, but it isn't working. Help!!!

Snoopy92211

This is my query. It's not working! :(

SELECT *
FROM tblsnoopy
WHERE (((trim([blahblah])) In ('123')));

(blahblah is a field in tblsnoopy with a length of 20 but the value is usually only three numbers, as show in this example)
Thanks a lot.

 
Instead of "In", should you be using "="?

SELECT *
FROM tblsnoopy
WHERE (((trim([blahblah])) [red]=[/red] ('123')));
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top