General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Hi Sergey,
At first, it looked like DISTINCT was working but on the second attempt to use it, it failed. I don't know if the problem is in my understanding or if I have uncovered an anomoly. Here is code which demonstrates the problem:
* this query fails--it gets distinct rows by empPK and location
SELECT DISTINCT iemppk,sortname,clocation;
FROM cureport1;
ORDER BY sortname;
INTO CURSOR Cu1
* this query fails--it gets distinct rows by empPK and location
SELECT DISTINCT iemppk,sortname,iDivPK;
FROM cureport1;
ORDER BY sortname;
INTO CURSOR Cu2
* this query succeeds--it gets distinct rows by empPK only
SELECT DISTINCT iemppk,sortname;
FROM cureport1;
ORDER BY sortname;
INTO CURSOR Cu3
Any idea what causes query 1 and 2 to fail?
If you want, I can email you the input data. It is small.
Thanks, Chaim
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only