Re: Select from Java Strings - Mailing list pgsql-general

From Harald Fuchs
Subject Re: Select from Java Strings
Date
Msg-id 86d3hqdvb6.fsf@mgm.protecting.net
Whole thread Raw
In response to Select from Java Strings  (Daron Ryan <daron.ryan@gmail.com>)
List pgsql-general
In article <4E116E11.1030209@gmail.com>,
Daron Ryan <daron.ryan@gmail.com> writes:

> Hello David,
> This is a simplified version of my own attempt:

> SELECT *
> FROM ("oxford", "webster")
> WHERE NOT ( columnName = ANY (SELECT name FROM dictionaries))

> The idea is that "oxford" and "webster" come from the Java program end up
> in the column called columnName.

If the list is not very long, you could use a VALUES expression:

SELECT g.x
FROM (VALUES ('oxford'), ('webster')) AS g(x)
WHERE g.x NOT IN (SELECT name FROM dictionaries)

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: When the Session ends in PGSQL?
Next
From: Michael Gould
Date:
Subject: problems installing odbc and .Net drivers