View Single Post
  #5 (permalink)  
Old 04-05-2008, 10:13 AM
MursPlace MursPlace is offline
WebProWorld Member
 

Join Date: Jan 2008
Posts: 25
MursPlace RepRank 1
Default Re: query in Access with a where block of: Model Like "*470*"

Quote:
Originally Posted by John Redfield View Post
Are you passing the query using ASP?

If so the wild card is %

Can you share your code?

John
Like John Said the wild card symbol is the percent % sign.

We have to guess you are using an IIS server with your access db.

3 basic search setup lines using LIKE statements.

1. Searching for a part number knowing first few characters.
" WHERE [table.name] LIKE '"& KeyWord &"%' "
The above says to check the letters entered and anything else that might be missing. Part Number 92 will return all parts starting with 92.

2. Searching for a part number knowing ending number or characters.
" WHERE Table.PartNumber LIKE '%"& PartNumber &"' "

3. Searching for word or words within text or numbers within text.
" WHERE [table.name] LIKE '%"& KeyWord &"%' "

That should do it for your LIKE search setup.

BUT:
Quote:
does not pull any data
You need to post your connection string as well (no username or passwords please)
Because from what you wrote your page might not even know it has data to work with!

It's always best to post what you coded so we can quickly fix it for you. Just change table names because you don't want to share your table structure with the world.
Good Luck

Last edited by MursPlace : 04-05-2008 at 10:18 AM.
Reply With Quote