I'm using a DENSE_RANK function in MS SQL to group by a datetime +/- 2hrs and it's working really well but I need to adapt it to Oracle and I'm having some trouble making that happen.
Here is the TSQL:
MyRank = DENSE_RANK()
OVER (ORDER BY
MyPID,MyAgency,MyCCD,(DATEADD(hour, (DATEDIFF(hour, '', MyDtTime)/2)*2,'')))
I tried a TSQL to Oracle converter thing but that's not getting it.
Any help will be greatly appreciated.