Hi Jim, since the geatest minds on the internet haven't come up with a solution in two days, I'll have go:

- we are talking about a straight query NOT a proc (grants via roles and all that)?

- where does it start to go wrong if you take it apart?
1)
SELECT * FROM B.DETAIL
SELECT * FROM B.PUB
2)
SELECT * FROM B.DETAIL d, B.PUB p
WHERE d.adno = p.adno
AND d.vno = p.vno
AND d.pubno = p.pubno;
3)
orginal query without the NOT IN (SELECT . . . ) clause