Wild Cards



I have a case where a distributed 2003 mde file contains
a query that uses the asterisk ("*") character as a wild
card in a criteria expression. E.g., Like "*-*". When an
attempt was made to use that query from within a WORD
2007 mail-merge, an empty set was returned. Having
recalled some discussion long ago about the use of the
percent ("%") character as a wild card, I created another
version of the query and re-distributed the 2003 mde file,
whereby the previously failed WORD 2007 mail-merge
was successful in obtaining the correct set.

Was there some compelling rationale to change the
somewhat de facto standard wild card from the asterisk
to the percent character, or is there more to this than
meets the eye?

Is the asterisk still valid as a wild card with A2007 queries,
or will A2003 queries that use the asterisk fail when a
A2003 mdb is converted to A2007?

The use of the percent character as a wild card in A2003
queries returns an empty set.




Douglas J. Steele

Much as it pains me to say, % is the "de facto wild card" character: Access
uses a non-standard character.

Access 2007 lets you specific ANSI-92 compliancy as an option (Access 2003
did as well). With that set, you must use %. Without it, you should be able
to use *, unless you're working with ADO, in which case you must use %.


Interesting. I can't speak to the history of Access, but
almost every computer language I've used for the past
47 years used the asterisk as the wild card or otherwise
to denote the use of the current memory address.

Thanks Doug, I'll brush up on ANSI-92.



Even more interesting. We (IBM) developed SQL and
the VM (Virtual Machine operating system) service
machine that provided the main-frame access to our
relational databases used "*" as the wild card. Somewhere
along the historical development of web-based servers,
something or someone brought about the change?





Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question