How to identify multi values in a column in select cause?
Hello there,
I have a long query statement with some sub-queries in it for POs. For a PO with more than 1 line, I need to identify if the values in a column are the same or different. For example:
Column name in po_lines_all table: Attribute1. I need to see if the values in attribute1 are the same or different for a PO. In my script, if they are the same, returns that value, when they are different, returns something like 'XXXXX'. I don't think count(*) > 1 can handle this.
I tried decode and it didn't work: decode (pha.attribute1, pha.attribute1, pha.attribute1, 'XXXXX') attribute1