| From: | Daron Ryan <daron(dot)ryan(at)gmail(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Search for lists |
| Date: | 2011-06-18 21:51:37 |
| Message-ID: | 4DFD1DE9.8040106@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hello,
I need to search a table to find sets of rows that have a column
matching itself for the whole set and another column matching row for
row with a list I am going to supply. The result I should receive should
be value of the column that matches itself.
For example given the following data in my table:
3; 1
3; 2
4; 8
4; 9
4; 10
I might need to search for 1,2. This should produce the result 3. Or if
I were to search for 8, 9, 10 the result should be 4. Searching for 8, 9
should produce an empty result as should 8, 9, 10, 11.
Can anyone recommend a strategy?
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Johnston | 2011-06-18 22:14:40 | Re: Search for lists |
| Previous Message | Frank Miles | 2011-06-18 20:50:44 | Re: set returning function with variable argument - possible? |