P
Phil
Hi,
I'm trying to print labels from a transaction table and a
mailing-list table. The mailing-list table has a one to
many relationship with the transaction table. My problem
is that I get duplicate labels because of the one to many
relationship. How do I get rid of the duplicates? I
tried using the DISTINCT command in the following code,
but it didn't work. Any Ideas? I have the date and
dollar fields to be able to restrict on those fields. The
Transaction.Mailning_List_Key is the field that duplicates
should be elimated on.
SELECT DISTINCT Transaction.Mailing_List_Key,
Transaction.Dollar_Amount, Transaction.Date, [Mailing
List].First_Name, [Mailing List].Last_Name, [Mailing
List].Organization, [Mailing List].Address_1, [Mailing
List].Address_2, [Mailing List].City, [Mailing
List].State, [Mailing List].Zip
FROM [Mailing List] INNER JOIN [Transaction] ON [Mailing
List].Mailing_List_Key = Transaction.Mailing_List_Key;
Thanks,
Phil
I'm trying to print labels from a transaction table and a
mailing-list table. The mailing-list table has a one to
many relationship with the transaction table. My problem
is that I get duplicate labels because of the one to many
relationship. How do I get rid of the duplicates? I
tried using the DISTINCT command in the following code,
but it didn't work. Any Ideas? I have the date and
dollar fields to be able to restrict on those fields. The
Transaction.Mailning_List_Key is the field that duplicates
should be elimated on.
SELECT DISTINCT Transaction.Mailing_List_Key,
Transaction.Dollar_Amount, Transaction.Date, [Mailing
List].First_Name, [Mailing List].Last_Name, [Mailing
List].Organization, [Mailing List].Address_1, [Mailing
List].Address_2, [Mailing List].City, [Mailing
List].State, [Mailing List].Zip
FROM [Mailing List] INNER JOIN [Transaction] ON [Mailing
List].Mailing_List_Key = Transaction.Mailing_List_Key;
Thanks,
Phil