Re: Check a value in array - Mailing list pgsql-sql

From Rod Taylor
Subject Re: Check a value in array
Date
Msg-id 1083261407.30065.303.camel@jester
Whole thread Raw
In response to Check a value in array  (Marco Lazzeri <marcomail@noze.it>)
Responses Re: Check a value in array
List pgsql-sql
On Thu, 2004-04-29 at 13:37, Marco Lazzeri wrote:
> Hi all.
> 
> I have to check if a value is in an array.
> 
> I've got a date array in a table and I would like to perform queries
> like:
> 
> SELECT * FROM table WHERE date IN dates_array;

If you're using 7.4 or later, try:
SELECT * FROM table WHERE date = ANY(dates_array);

This will work without the contrib package.




pgsql-sql by date:

Previous
From: Marco Lazzeri
Date:
Subject: Check a value in array
Next
From: Josh Berkus
Date:
Subject: Re: Equivalant of SQL Server's Nchar and NVARCHAR