I recently experienced that using DISTINCT gets un...
# suiteql
s
I recently experienced that using DISTINCT gets unique values based on the 1st column only, not the whole row. Is it something expected or does it look like a bug?
j
Can you post your SQL?
s
Copy code
SELECT DISTINCT TO_CHAR(T.trandate, 'DD'), TO_CHAR(AP.startdate, 'MM'), T.id, T.trandate, AP.startdate FROM transactionline TL LEFT JOIN transaction T ON T.id = TL.transaction LEFT JOIN accountingperiod AP on T.postingperiod = AP.id WHERE TL.subsidiary = 19 AND TO_CHAR(T.trandate, 'DD') = TO_CHAR(AP.startdate, 'MM') AND T.posting = 'T'