Click to See Complete Forum and Search --> : Distinct predicate
Sheryl M
May 10th, 2001, 05:50 AM
Hi! I am using ado in my current project. I am setting the record source of the ado run time. In the record source, I used the DISTINCT predicate as part of my SQL. But the result still displays duplicate records. The ado is bound to a grid and displays four fields. The duplicate records displays exactly the same data for the four fields. Please help me. Thank you.
Andrew_Fryer
May 10th, 2001, 06:15 AM
Do you have a primary key set. I dunno if that will make a difference, but it is all I can think of
Iouri
May 10th, 2001, 07:04 AM
Post your SQL
Iouri Boutchkine
iouri@hotsheet.com
Sheryl M
May 10th, 2001, 09:05 PM
my sql is:
SELECT DISTINCT(handling_lawyer.docketno), draft_documents.date_creatd, draft_documents.docket_num, draft_documents.draft_name, draft_documents.rowid, handling_lawyer.transactiontype FROM handling_lawyer, draft_documents WHERE draft_documents.draft LIKE '%" & txtSearch.Text & "%' AND draft_documents.docket_num = handling_lawyer.docketno AND handling_lawyer.transactiontype = 'case'
coolbiz
May 11th, 2001, 07:00 AM
Try to use the GROUP BY clause for the handling_lawyer.docketno.
-Cool Bizs
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.