Selecting values from comma separated string

From: Nacef LABIDI <nacef(dot)l(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Selecting values from comma separated string
Date: 2009-08-26 13:19:38
Message-ID: f16f7ea00908260619t59555d37u66bebfe47132304f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message A. Kretschmer 2009-08-26 13:30:36 Re: Selecting values from comma separated string
Previous Message Denis BUCHER 2009-08-25 20:16:24 Re: Question about encoding