Go Back   CodingForums.com > :: Server side development > MySQL > Other Databases

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-15-2006, 07:54 PM   PM User | #1
jtrechter
New Coder

 
Join Date: Mar 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
jtrechter is an unknown quantity at this point
Wildcard in Access DB

Can somebody tell me what's wrong with my query?

SELECT main_table.FirstName
FROM main_table
WHERE main_table.FirstName= "%ann%";

I have the following firstnames: Jacqui-ann, Anna, Anne, James, and Sarah.
I'm supposed to get back the first three names, correct? I'm doing this in MS Access and my results are zero. I don't see anything wrong with my query and I've used the design view and the help guides, but still no results. Is it different in Access or something? I'm not getting errors though. Thanks.
jtrechter is offline   Reply With Quote
Old 11-16-2006, 01:13 AM   PM User | #2
ess
Regular Coder

 
Join Date: Oct 2006
Location: United Kingdom
Posts: 865
Thanks: 7
Thanked 29 Times in 28 Posts
ess will become famous soon enough
It has been a while since I used MS Access...so...not sure if this would work or not....

Code:
SELECT main_table.FirstName
FROM main_table
WHERE (((main_table.FirstName) Like "*nn*"));
good luck.
Ess
ess is offline   Reply With Quote
Old 11-16-2006, 03:41 AM   PM User | #3
vinyl-junkie
$object->toCD-R(LP);


 
vinyl-junkie's Avatar
 
Join Date: Jun 2003
Posts: 3,054
Thanks: 2
Thanked 22 Times in 22 Posts
vinyl-junkie is on a distinguished road
This should work:

Code:
SELECT main_table.FirstName
FROM main_table
WHERE main_table.FirstName Like '%nn%'
__________________
Music Around The World - Collecting tips, trade
and want lists, album reviews, & more
SNAP to it!
vinyl-junkie is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:13 PM.


Advertisement
Log in to turn off these ads.