From: | David Johnston <polobo(at)yahoo(dot)com> |
---|---|
To: | Daron Ryan <daron(dot)ryan(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Select from Java Strings |
Date: | 2011-07-03 16:15:16 |
Message-ID: | C6F72661-0FFC-4C25-876B-DEDB9408A016@yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Jul 3, 2011, at 11:13, Daron Ryan <daron(dot)ryan(at)gmail(dot)com> wrote:
> I have strings from
> java and need to check which ones are not present in the db. Can
> I use a select statement to do this by making it search my
> strings as though they are a table?
There are multiple ways to accomplish your goal, which each have merits and issues.
1. Java for loop and look for each string one at a time
2. Convert your strings into a Postgres array and query all of them at once
3. Insert your strings into a table and execute a query to check them all at once
If you want more help than this you should provide more specific details about your situation. Your question seems odd at first reading, especially the part where you want to find out which strings are NOT present.
David J
From | Date | Subject | |
---|---|---|---|
Next Message | Alban Hertroys | 2011-07-03 16:50:26 | Re: out of memory error |
Previous Message | Vincent Veyron | 2011-07-03 16:07:07 | Re: How to create "auto-increment" field WITHOUT a sequence object? |