I am trying to identify (return records) for records that meet a specific criteria. For example. I have a maintenance table that shows the ticket details for each maintenance. For each device that this being worked on during the maintenance will create a record having the same GUI ID.
What I would like to do is identify for EACH day device names that are showing up more than once. This will help me de-conflict maintenance before approving them.
Here is the query that I am trying to modify:
from CHANGE_REQUEST CM INNER JOIN RELATED_DEVICES DE ON CM.GUI_ID=DE.GUI_ID AND DE.RECORD_STATUS = 0
AND CM.PRIMARY_START_DATE_TIME >= TO_DATE('1/1/2015','MM/DD/YYYY')
AND CM.PRIMARY_START_DATE_TIME < TO_DATE('2/1/2015','MM/DD/YYYY')
See example. The highlighted rows are the only records I want to return, since both change id's are on the same day and the device Name match.