>I have a column in the table that looks like this
>
>Items
>-----
>1:2:4:7:9:12:
>3:4:6:8:10:11:13:
>2:4:8:9:12:14:
>6:9:13:17:22:
>
>I want to select all rows where Items contain 2: or 8:. I started with
select * from parts where atc(":2:",":"+parts.Items)>0 ;
OR atc(":8:",":"+parts.Items)>0
Adding ":" to the front of the Items column allows you to search for :2: without having a special case for when 2: are the first two characters.
Then the OR clause is easy.
create cursor test (items c(20))
INSERT INTO test VALUES ("1:2:4:7:9:12:")
INSERT INTO test VALUES ("3:4:6:8:10:11:13:")
INSERT INTO test VALUES ("2:4:8:9:12:14:")
INSERT INTO test VALUES ("6:9:13:17:22:")
SELECT RECNO() which,* ;
FROM test WHERE ATC(":2:",":"+items) >0
SELECT RECNO() which,* ;
FROM test WHERE ATC(":2:",":"+items) >0 ;
OR ATC(":8:",":"+items) >0