Re: [SQL] using a list to query

2009-05-03 Thread johnf
On Saturday 02 May 2009 06:34:57 pm Craig Ringer wrote: > johnf wrote: > > I have a list (or array) of primary keys stored in a field (data type > > text). I would like to use the list to retrieve all the data from a table > > based on the list. > > > > my text field contains: > > '123,134,343,345

Re: [SQL] using a list to query

2009-05-02 Thread Craig Ringer
johnf wrote: > I have a list (or array) of primary keys stored in a field (data type text). > I would like to use the list to retrieve all the data from a table based on > the list. > > my text field contains: > '123,134,343,345' > > I would to do something like the following: > > Select * f

[SQL] using a list to query

2009-05-02 Thread johnf
I have a list (or array) of primary keys stored in a field (data type text). I would like to use the list to retrieve all the data from a table based on the list. my text field contains: '123,134,343,345' I would to do something like the following: Select * from table1 where table1.pkid in (