Hi Anthony,
You don't need REGEXP for this; LIKE will do. Try something like this:
... WHERE CONCAT(',', Column, ',') LIKE '%,2,%'
to search for rows that contain 2.
Hope that helps.
Matt
----- Original Message -----
From: "award"
Sent: Saturday, March 13, 2004 2:16 PM
Subject: query question using REGEXP
> Hi,
>
> I'm storing in a database numbers separated by comma if more than one
> number i.e
> Record # Column
> 1 12
> 2 1,2,5,6
> 3 1,12,24,45
> 4 2,6
>
> Now if I want to search for records that has number 1 it will find
> records 1,2,3
> but what I want to return only record 2,3
> an example is that if I'm looking for a record that has a number 2
> it will print record 1,2,3,4 but what I want is only record 2,4
>
> Any help is appreciated,
> anthony
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]