Forum Moderators: open
Here is my query...
create table CE3or31
as (select o.repcode, firstname, lastname, o.eftstart
from rep r, repother o
where r.repcode = o.repcode
and (lictype0 = 31 OR
lictype1 = 31 OR
lictype2 = 31 OR lictype3 = 31
OR lictype4 = 31 OR lictype5 = 31 OR lictype6 = 31
or lictype7 = 31 or lictype8 = 31 or lictype9 = 31
or lictype0 = 3 or lictype1 = 3 or lictype2 = 3
or lictype3 = 3 or lictype4 = 3 or lictype5 = 3
or lictype6 = 3 or lictype7 = 3 or lictype8 = 3
or lictype9 = 3)
and lastname not like '%TERM'
order by lastname)
Thanks for the help!