Senin, 20 Oktober 2014

Re: [MS_AccessPros] How to enter different product in the same carton

 

Khalid-


All those 844 records are duplicates with regard to Consignment, Carton, and Suffix.

You can find out how many by slightly modifying the query:

SELECT ConsignmentNo, CartonNo, CartonSuffix, Count(*) As NumDuplicates
FROM CollectionVoucher
GROUP BY ConsignmentNo, CartonNo, CartonSuffix
HAVING Count(*) > 1

You need to figure out why there are duplicate CartonNo values within the displayed Consignments.  You told me earlier that ConsignmentNo is the Primary Key of another table, so you shouldn't have duplicate Cartons within each unique Consignment.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)




On Oct 20, 2014, at 2:26 PM, Khalid Tanweer khalidtanweerburrah@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

John ,

I run that query and showed 844 records. The table CollectionVoucher itself has 4746 records.

Why it is so? The duplicate records are for different Consignments and remaining 4746 -844 = 3902 records are not included in duplicate records as they do contain Carton numbers of the 844 records.

Now what i have to do?

Khalid

__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (14)

.

__,_._,___

Tidak ada komentar:

Posting Komentar