-
Hi everyone,
I have a SQL query that uses a DISTINCT to retrieve only unique records. When I run it on iSQL_w (for SQL Server 6.5), it works fine. When I run it within my VB app, the DISTINCT doesn't seem to work (it gives me multiple records instead of uniques).
Does anyone have an idea about how to correct this ?
Thanks,
Joel
-
Not sure if this helps but...
select distinct testpoint from mytable
will return all distinct testpoints, for example
0010
0020
0030
but............
select distinct testpoint, tpstatus from mytable
If you choose two fields it must match both...
for example, testpoint and status
0010 scheduled
0010 flown
not distinct from the testpoint point of view but it is from the testpoint and status.
Does that help out at all?
-
Unfortunately, it doesn't apply here. I only have 1 column...
Thanks anyways ;)
Joel
-
What is the actual SQL you are using, and how are you applying it?
Cheers,
P.
-
The other thing is using a client side or server side cursor. Client side updateable cursors do not support DISTINCT.
Cheers,
P.