I have a table
CREATE TABLE [dbo].[myTable]( [p_id] [varchar](3) NOT NULL, [s_id] [varchar](9) NOT NULL, [d_name] [varchar](9) NOT NULL, [status] [varchar](1) NOT NULL)
And it has the following data.
1 1 X1 N 1 1 X2 E 1 1 X3 E 1 2 Y1 E 1 2 Y2 E 1 2 Y3 E 1 3 Z1 N 1 3 Z2 NI would like to get the p_id and s_id where all the records for a given p_id and s_id contain status = 'N'. That is I'm look to get back p_id = 1 and s_id = 3 because all the records contain an 'N'.
lg