|
-
Apr 4th, 2001, 01:02 PM
#1
Thread Starter
New Member
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
-
Apr 4th, 2001, 01:07 PM
#2
Hyperactive Member
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?
-
Apr 4th, 2001, 01:12 PM
#3
Thread Starter
New Member
Unfortunately, it doesn't apply here. I only have 1 column...
Thanks anyways
Joel
-
Apr 5th, 2001, 04:12 AM
#4
Fanatic Member
What is the actual SQL you are using, and how are you applying it?
Cheers,
P.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Apr 5th, 2001, 08:40 AM
#5
Fanatic Member
The other thing is using a client side or server side cursor. Client side updateable cursors do not support DISTINCT.
Cheers,
P.
Not nearly so tired now...
Haven't been around much so be gentle...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|