At 4:01 +0200 10/8/04, Przemyslaw Popielarski wrote:
Paul DuBois <[EMAIL PROTECTED]> wrote:
SELECT
@a:=FIRMLEGALZIPCODE
FROM tCustomers
WHERE @a REGEXP "[0-9]"
-> Empty set (0.03 sec)
You're expecting the value to be selected first so that you then can
test it with the WHERE clause later.
Of course you're right. Thanks. According to your suggestion this one works
okey:
SELECT
@a
FROM tCustomers
WHERE @a:=FIRMLEGALZIPCODE REGEXP "[0-9]"
True, although in this case you don't need a user variable at all:
SELECT
FIRMLEGALZIPCODE
FROM tCustomers
WHERE FIRMLEGALZIPCODE REGEXP "[0-9]"
--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]