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
umber, then the query I gave will work
fine for that because it adds a comma to the beginning and end of the
column (with CONCAT()) before doing the LIKE comparison.
Matt
- Original Message -
From: "award"
Sent: Saturday, March 13, 2004 5:10 PM
Subject: RE: query question using REG
turday, 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
> 112
> 2
Hi,
I'm storing in a database numbers separated by comma if more than one
number i.e
Record # Column
112
21,2,5,6
31,12,24,45
4 2