This worked great.  Thank you very much.

>>> Douglas Sims <[EMAIL PROTECTED]> 1/27/2004 12:23:59 PM >>>

It sounds as if you need to use a regular expression.

For very simple string comparisons, use =, as in wbs='Fish'
For more complex string comparisions with simple wildcards, use LIKE as
in wbs LIKE "%fish%"
For most complex comparisions, use a regular expression, as in wbs
REGEXP ".\d"

In the REGEXP example I listed above, the pattern will match all
strings which contain one character (.) followed by one digit (\d).  If
you want to only match strings which start with one chracter followed by
one digit, for example, you would say "^.\d".
. represents any character
\d represents only characters in the digits class (0-9)
^ means at the start of the string (if it's at the start of the regexp,
otherwise it can mean "not")

Regular expressions are amazing things if used properly. 
http://www.mysql.com/doc/en/Pattern_matching.html

Note that in MySQL, the wildcard characters are _ and %, where _
represents a single character and % represents any number of characters,
unlike Access, where if I remember, # means one char and * means any
number of characters (?)

Good luck!



For Jacque Scott wrote:
I am converting over to mySQL from Access 2.0 and I am having a
littletrouble with a query.  Here it is: SELECT Max(WBS) AS LastOfWBS
FROM Projects Where((WBS)) Like """ &txtEntryData(0).Text & "#%"";I am
trying to get the last WBS ID starting with a particular letterthe user
will type in the textbox.  My criteria is that it has to startwith a
letter and the next character is a number.  There can be lettersor more
numbers to the right of the first number.  For example:  A01C orB001,
but not AB01.  In Access we could use the following query:SELECT
DISTINCT Max([Projects].[WBS]) AS LastOfWBS FROM Projects where
(Projects.WBS) Like """ & txtEntryData(0).Text &"#*""; How can I insure
when using mySQL that the second character is anumber?  

Reply via email to