Hi,
Is there a simple query to extract the rows as below
Suppose the data is as follows
Part# Assebly# Type
-------- ------------- -------
P1 A1 Yes
P2 A2 Yes
P1 A3 No
P3 A4 No
P1 A5 Yes
P2 A6 Yes
get all rows where at least one type field for a part# is "No". i.e.
the result rows should be
Part# Assebly# Type
-------- ------------- -------
P1 A1 Yes
P1 A3 No
P1 A5 Yes
P3 A4 No
the rows with part#P2 is not extracted because tpye field for all the
P2 records is "Yes".
So first I should pick up Part# with type "No" and then get all rows in
the table with that part# irrespective of Type. And this table is
having one million rows.
Is there a simple query to extract the rows as below
Suppose the data is as follows
Part# Assebly# Type
-------- ------------- -------
P1 A1 Yes
P2 A2 Yes
P1 A3 No
P3 A4 No
P1 A5 Yes
P2 A6 Yes
get all rows where at least one type field for a part# is "No". i.e.
the result rows should be
Part# Assebly# Type
-------- ------------- -------
P1 A1 Yes
P1 A3 No
P1 A5 Yes
P3 A4 No
the rows with part#P2 is not extracted because tpye field for all the
P2 records is "Yes".
So first I should pick up Part# with type "No" and then get all rows in
the table with that part# irrespective of Type. And this table is
having one million rows.
Comment