Creating Complex List

Results 1 to 2 of 2

Thread: Creating Complex List

  1. #1
    Join Date
    Dec 1969

    Default Creating Complex List

    Whoo, this is a whacky one, so here we go.<BR><BR>I currently have 2 tables. One contains a listing of people that include a Duns number (with lat. & long. for mapping) as well as a phone number. The second list is one of our customers. But, due to the way we ship products, there are sometimes two entries for a customer. They each have a unique Account Number, but a different shipto number. Sometimes these different shipto numbers have a different phone number and sometimes they don&#039;t.<BR><BR>What I need to do, is create a list by Unique Duns numbers and have a field that if there is a match(s) with our customers, list the appropriate account numbers.<BR><BR>I know, sounds fun... don&#039;t it?

  2. #2
    Join Date
    Dec 1969

    Default Seems pretty simple to me...

    I presume you are using the phone number as the PK/FK relationship between the two tables???<BR><BR>SELECT D.number,, C.acctNumber,<BR>FROM Duns AS D, Customers AS C<BR>WHERE =<BR>GROUP BY D.number<BR>ORDER BY D.number, C.whatever<BR><BR>Hmmm...or when you said "...two entries for a customer. They each have a unique acct number..." did you say that wrong???<BR><BR>Do you mean that the each have the *same* acct number? Two entries with same acct number but different shipto numbers???<BR><BR>Maybe you need to show some sample data?<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts