thanks for your response. that's not what i'm after as:
case
when a.refno is null then b.refno > tmp.refno
else
a.refno > b.refno
If a.refno is null then I want b.refno to be greater than tmp.refno. If a.refno is not null then I want a.refno to be greater than b.refno whereas the code you supplied ALWAYS has either a.refno or tmp.refno to be greater than b.refno.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.