[...]
> 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.
[...]
How about:
DROP TAB
Le 18/06/2011 23:51, Daron Ryan a écrit :
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 it
Thanks.
On 19/06/2011 8:09 AM, David Johnston wrote:
An alternative approach would be to select using a IN condition on the where
clause and group by column 1 and column 2. Then, using this as a sub-select
group by the resultant column 1 and a count on column two. The matching
identifiers a
An alternative approach would be to select using a IN condition on the where
clause and group by column 1 and column 2. Then, using this as a sub-select
group by the resultant column 1 and a count on column two. The matching
identifiers are those with a count equal to the number of entries in
Untested approach
Use array_agg on column 2 along with group by on column 1 to build check arrays
and then use equals to compare with an array of your desired input values.
You should omit duplicates and order ascending both the data and the input to
ensure you are matching canonical forms.
Dav
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