*Apologies as I know this question has been asked before, but tried the previously suggested approaches and none fixed my issue.
I am trying to compare a table found in two databases.
COLUMN_VALUE
01.00^01.13
01.00 01.12
01.00 01.15
Unfortunately, the table does not have a primary key, so I am trying to order by the same column and compare that way.
When I sort the above table in Oracle, it sorts to:
SELECT * FROM (
SELECT '01.00 01.12' AS "COLUMN_VALUE" FROM DUAL
UNION ALL
SELECT '01.00^01.13' AS "COLUMN_VALUE" FROM DUAL
UNION ALL
SELECT '01.00 01.15' AS "COLUMN_VALUE" FROM DUAL) ORDER BY 1;
COLUMN_VALUE
01.00 01.12
01.00 01.15
01.00^01.13
However, when I perform the sort in Postgres, it sorts to:
SELECT * FROM (
SELECT '01.00 01.12' AS "COLUMN_VALUE"
UNION ALL
SELECT '01.00^01.13' AS "COLUMN_VALUE"
UNION ALL
SELECT '01.00 01.15' AS "COLUMN_VALUE") T1 ORDER BY 1;
COLUMN_VALUE
01.00 01.12
01.00^01.13
01.00 01.15
This issue appears to be how the ^
character is sorted. Does anyone know a workaround so that both databases sort the information the same way?