From: johnf <jfabiani@yolo.com>
To: pgsql-sql@postgresql.org
Subject: using a list to query
Date: Sat, 2 May 2009 09:55:29 -0700
Message-ID: <200905020955.29386.jfabiani@yolo.com> (raw)
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 (select myTextfield from table2)
So the question is there a simple way to use the list to retrieve my data?
--
John Fabiani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jfabiani@yolo.com
Subject: Re: using a list to query
In-Reply-To: <200905020955.29386.jfabiani@yolo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox