SQL use DISTINCT with ORDER BY (Oracle)
- by ArneRie
Hi,
i have an strange problem. I want to select "timestamps" from an DB Table with Distinct and orderded by timestamp.
ID TimeStamp
-- ---------
1 123456789
2 123456789
3 333333333
4 334345643
In my PHP Script:
$sql = "SELECT DISTINCT TIMESTAMP FROM TIMESTAMPS ORDER BY TIMESTAMP"
When i use order by, the values are returned twice? Without order by the
result is correct.. but not sorted.
We are using Oracle 10g
Any ideaS?