XMLType Column Comparison in Select Query [message #674768] |
Thu, 14 February 2019 17:29 |
|
sotu100
Messages: 1 Registered: February 2019
|
Junior Member |
|
|
Hello,
Attached is the database schema that I have.
My requirement is to get all the IDs which :
exists more than one AND
<ORDER> is same for all of them AND
<ITEM> is same for all of them AND
<MATERIAL> is same for all of them
For the data that I have provided, the query output should be :
ID IDLANE IDDATE
111 111R1 2019-02-10T10:00:00
111 111R2 2019-02-10T11:00:00
It wont include 222 because both 222 IDs have different Material.
I wrote the query to identify more than one ID as below:
SELECT ID FROM IDTABLE
GROUP BY ID
HAVING COUNT(*) > 1
Above query gives me 111 & 222 as answers because both of the IDs exist more than one. But I need to compare XMLTyple COlumn's , and too with each same ID appearing twice. But I do not know how to compare XML Type columns.
Can anyone provide some inputs.
Thanks
|
|
|
|
|
|