select TransactionItemId as documentid, booktype from tblTransactionItem where book = '2015' and page = '718' and booktype = 'OR' and doctype not in ('ADP', 'CSUP', 'CERDC', 'DOMR', 'MIL', 'JUV', 'PRBC', 'PRO', 'FL', 'INM')