sql - Extracting Records which 'No' Criteria only -
i have view in sql retrieves below result:
emp id first name last name made payment bigger $2000 in last 12 months 10023 keith brown no 10023 keith brown no 10023 keith brown yes 31522 maxine wood no 31522 maxine wood no 31522 maxine wood yes 31522 maxine wood yes 31522 maxine wood no 32007 mark taylor no 32007 mark taylor no 32007 mark taylor no 32007 mark taylor no 32012 christopher benson yes 32034 william cecchini no 32034 william cecchini no 32034 william cecchini no 32034 william cecchini no 32037 gregory thomas no 32037 gregory thomas no 32037 gregory thomas no 32037 gregory thomas no 32037 gregory thomas no 32037 gregory thomas no 32037 gregory thomas yes
i want result employees results "no" not "yes"..... or if rephrased, employees "no" only
my limitations cannot use declared variable extract info.
the result set looking above view
emp id first name last name 32007 mark taylor 32034 william cecchini
any or direct highly appreciated.
regards
try this:
select distinct empid, first, last table empid not in ( select empid table madepayment='yes' )