pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nacef LABIDI <nacef.l@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Selecting values from comma separated string
Date: Wed, 26 Aug 2009 14:19:38 +0100
Message-ID: <f16f7ea00908260619t59555d37u66bebfe47132304f@mail.gmail.com> (raw)

Hi all,

I want to write a function that takes as param a comma separated values
string and perform a select matching these values.

Here is the string '1,3,7,8'

And I wan to perform a : SELECT * FROM my_table WHERE id IN (1, 3, 7, 8);

Does anyone have a clue ?

Thanks

Nacef

view thread (7+ messages)  latest in thread

Message-ID: <f16f7ea00908260619t59555d37u66bebfe47132304f@mail.gmail.com>
Permalink:  ../f16f7ea00908260619t59555d37u66bebfe47132304f@mail.gmail.com/
Also on:    postgresql.org/message-id/f16f7ea00908260619t59555d37u66bebfe47132304f@mail.gmail.com

 · 

reply

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: nacef.l@gmail.com
  Subject: Re: Selecting values from comma separated string
  In-Reply-To: <f16f7ea00908260619t59555d37u66bebfe47132304f@mail.gmail.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