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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not see the dashs in a querry?

Status
Not open for further replies.

dmhayes

Technical User
Jun 1, 2005
7
AU
i have a database that searchs for part numbers and in these feilds are also dashs and dots can i tell the querry or code to not worry about the dashs.

So it will give me a result of everything that matches the number and text . Not worrying about the dash that was type in my the user.

Regards
Me
 
Something like this ?
WHERE Replace([P/N field], '-', '') = [Please enter Part#]

You may have to write your own Replace function.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
This is the code in sql

WHERE (((PARTS.[PART NUMBER]) Like [Please enter Part No] & '*'))

use this one

WHERE Replace(((PARTS.[PART NUMBER]'-',")Like [Please enter Part No] & '*'))


thank you for help
 
And you don't get syntax error ?
WHERE Replace(PARTS.[PART NUMBER][tt],'-',''[/tt]) Like [Please enter Part No] & [tt]'*'[/tt]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I did not run my one.

But i ran your one that you did and got an error...

TO complex to be evaluated use variables...

regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top