Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Grd Grd is offline
external usenet poster
 
Posts: 118
Default Wildcard character in MS Query

Hi There,

I'm using a parameter for eg [Please enter City] in my MSQuery connecting to
my SQL SErver database. How do I allow for an all option. I think it is using
a wildcard but can't quite figure it out.

Any help greatly appreciated

Gordon
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default Wildcard character in MS Query

If your SQL is set up to use the LIKE operator, the code will accommodate
anything your parameter specifies.

Example:
WHERE City LIKE [Please enter City]

If the parameter equals: Paris
Only "Paris" entries will be returned.

However, if the parameter is: P*
All cities beginning with "P" will be returned.

Note: you may need to change the wildcard character to suit your DB.

Does that help?
Post back if you have more questions.
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)


Just an asterisk returns all cities.
"Grd" wrote in message
...
Hi There,

I'm using a parameter for eg [Please enter City] in my MSQuery connecting
to
my SQL SErver database. How do I allow for an all option. I think it is
using
a wildcard but can't quite figure it out.

Any help greatly appreciated

Gordon



  #3   Report Post  
Posted to microsoft.public.excel.misc
Grd Grd is offline
external usenet poster
 
Posts: 118
Default Wildcard character in MS Query

Thanks

Will give that a go

"Ron Coderre" wrote:

If your SQL is set up to use the LIKE operator, the code will accommodate
anything your parameter specifies.

Example:
WHERE City LIKE [Please enter City]

If the parameter equals: Paris
Only "Paris" entries will be returned.

However, if the parameter is: P*
All cities beginning with "P" will be returned.

Note: you may need to change the wildcard character to suit your DB.

Does that help?
Post back if you have more questions.
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)


Just an asterisk returns all cities.
"Grd" wrote in message
...
Hi There,

I'm using a parameter for eg [Please enter City] in my MSQuery connecting
to
my SQL SErver database. How do I allow for an all option. I think it is
using
a wildcard but can't quite figure it out.

Any help greatly appreciated

Gordon




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wildcard character inside sumproduct andy62 Excel Worksheet Functions 4 November 1st 06 09:46 AM
Wildcard Character in an Array Formula Scorpvin Excel Discussion (Misc queries) 2 September 30th 05 06:44 PM
How do I use the wildcard character and the NOT function? KDA Excel Worksheet Functions 1 June 24th 05 04:36 PM
Wildcard character agenda9533 Excel Discussion (Misc queries) 1 May 11th 05 05:11 PM
Wildcard Character John Excel Worksheet Functions 7 November 30th 04 10:54 PM


All times are GMT +1. The time now is 02:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"