|
-
August 8th, 2001, 01:37 PM
#1
SQL
I am trying to execute a select statement in Access 2000. I need to know how to use
wildcard's in the statement. I thought you used the * for a wildcard in the LIKE clause but apparently not.
My SQL statement looks like this:
SELECT * FROM [Table] WHERE [Table].[Field] LIKE *
The problem is in the LIKE part of the statement. I need to know how use LIKE to find anything (wildcard) in the particular field.
Thanks for any help!!!
Kris
Software Engineer
Phoenix,AZ
Kris
Software Engineer
Phoenix, AZ USA
-
August 8th, 2001, 01:58 PM
#2
Re: SQL
Try to use % instead of *
and _ instead of ?
SELECT * FROM [Table] WHERE [Table].[Field] LIKE 'ABC%'
This SQL will give you everything starting with ABC
Iouri Boutchkine
[email protected]
-
August 9th, 2001, 02:06 AM
#3
Re: SQL
Hello,
enclose the asterisk in single quotes, i.e
SELECT * FROM [Table] WHERE [TABLE].[FIELD] LIKE '*'
alternatively the code you have provided seems to return all the values when it works so why not use
SELECT * FROM [TABLE]
Hope this helps
Andrew
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|