|
Posted by Jerry Stuckle on 05/26/05 07:45
Funnyweb wrote:
> I have a database table, which has field that could contain a single integer
> or a list of comma separated integers.
>
> Is it possible to match each row of that field against an array of integers
> and return those rows where any of the integers in that field are in my
> array?
>
> For example suppose I did the following:
>
> arInts = array(2,4,6,8,10);
>
> What I want to do is return all rows from my table where my field contains a
> single integer and it is in my array, or where my field contains a list of
> integers and any of those integers is in my array?
>
> Is this possible and if so how do I do it?
>
> Thanks
>
> Hamilton
>
>
>
Hamilton,
Try reading up on database normalization. Then create a link table with
two columns. First is the primary key of the original table, second is
a *single* integer. Multiple rows can have the same first column but
the second column would chance.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|