L
Lori
I have several queries that are used as the source for some mailing label
reports. I need to make sure only one label is printed per vendor_nbr (this
is not a unique field in the database). How can I make sure only one label
is selected if multiple records are selected with the same vendor-nbr? Here
is my sql behind my query:
SELECT tbl_Vendor.Local_Agency_Code, tbl_Vendor.Vendor_Nbr,
tbl_Vendor.Chain_Suffix, tbl_Vendor.Vendor_Name, tbl_Vendor.M_Line_One,
tbl_Vendor.M_Line_Two, tbl_Vendor.M_City, tbl_Vendor.M_State,
tbl_Vendor.M_Zip_Code
FROM tbl_Vendor, tblCount
WHERE (((tbl_Vendor.Chain_Suffix)<>0) AND ((tblCount.CountID)<=[How many
labels are needed per vendor?]) AND ((tbl_Vendor.Region_Code)="0") AND
((tbl_Vendor.Peer_Group_Code)=11) AND ((tbl_Vendor.Status_Code)="active") AND
((tbl_Vendor.Label_Code)="1"))
ORDER BY tbl_Vendor.Local_Agency_Code, tbl_Vendor.Vendor_Nbr;
Thanks for any help!
reports. I need to make sure only one label is printed per vendor_nbr (this
is not a unique field in the database). How can I make sure only one label
is selected if multiple records are selected with the same vendor-nbr? Here
is my sql behind my query:
SELECT tbl_Vendor.Local_Agency_Code, tbl_Vendor.Vendor_Nbr,
tbl_Vendor.Chain_Suffix, tbl_Vendor.Vendor_Name, tbl_Vendor.M_Line_One,
tbl_Vendor.M_Line_Two, tbl_Vendor.M_City, tbl_Vendor.M_State,
tbl_Vendor.M_Zip_Code
FROM tbl_Vendor, tblCount
WHERE (((tbl_Vendor.Chain_Suffix)<>0) AND ((tblCount.CountID)<=[How many
labels are needed per vendor?]) AND ((tbl_Vendor.Region_Code)="0") AND
((tbl_Vendor.Peer_Group_Code)=11) AND ((tbl_Vendor.Status_Code)="active") AND
((tbl_Vendor.Label_Code)="1"))
ORDER BY tbl_Vendor.Local_Agency_Code, tbl_Vendor.Vendor_Nbr;
Thanks for any help!