I have a table where a job number field can have multiple records. It has a field also that holds an archive flag.
I need a SQL statement that will only result in a list of job numbers that when grouped together not one of them has an archive flag value of 0.
The following will give me job numbers that I do not desire. Because for instance job number MES4000 is listed 3 times with two records with archive flag set to 1 an one record set to 0.
So I would not want this in my result.
testconnString = "Select Distinct jobno, archivef From webprddt1.resmngta0" +;
" Where posstr(jobno,'MES') > 0 And archivef = 1"