Hi, I am having trouble with the following piece of SQL.
I have 2 Tables: POHEAD and POLINE - THEY SHOULD BE LINKED ON THE ORD_NO field, primary for both. I am trying to identify and return lines on a purchase order where the same catalogue item has been ordered twice.
I want to get the ORD_NO from the POHEAD Table, ORD_NO & ORD_LIN_NO & CATALOGUE fron the POLINE table, where the same catalogue item has been ordered twice on 1 ORD_NO for sysdate.
I have tried a few options below the latest, but this is giving me an error back
RSSPOLINE.STATUS <> 'Z'
RSSPOHEAD.ORD_DATE = to_char(sysdate,'YYYYMMDD')
count(RSSPOLINE.CATALOGUE) <>count (distinct RSSPOLINE.CATALOGUE)