T
tamxwell
I have two tables, one the main table "AR Details" has all invoice records
with all the dollar amount, the second table "Nameaddress" has just customer
names, customer numbers, and addresses. I join the tables and wrote a query
to pull only the records that match and only have a CA number (one of the
fields) My query finds all the company numbers and names. I will list my
query below.
SELECT DISTINCT ARDetailAging.[co-number], ARDetailAging.[cust-number],
ARDetailAging.[divn-number], ARDetailAging.[ref-number],
ARDetailAging.[as-of-date], ARDetailAging.[due-date],
ARDetailAging.[job-number], ARDetailAging.[trans-code],
ARDetailAging.[item-type], ARDetailAging.[status-code],
ARDetailAging.[amount-code], ARDetailAging.[item-amount],
ARDetailAging.[cust-name], ARDetailAging.[slsm-number],
ARDetailAging.[PO-Num], NAMEADDR.ca
FROM ARDetailAging LEFT JOIN NAMEADDR ON ARDetailAging.[cust-name] =
NAMEADDR.[customer name]
ORDER BY ARDetailAging.[co-number], ARDetailAging.[cust-number],
ARDetailAging.[ref-number];
with all the dollar amount, the second table "Nameaddress" has just customer
names, customer numbers, and addresses. I join the tables and wrote a query
to pull only the records that match and only have a CA number (one of the
fields) My query finds all the company numbers and names. I will list my
query below.
SELECT DISTINCT ARDetailAging.[co-number], ARDetailAging.[cust-number],
ARDetailAging.[divn-number], ARDetailAging.[ref-number],
ARDetailAging.[as-of-date], ARDetailAging.[due-date],
ARDetailAging.[job-number], ARDetailAging.[trans-code],
ARDetailAging.[item-type], ARDetailAging.[status-code],
ARDetailAging.[amount-code], ARDetailAging.[item-amount],
ARDetailAging.[cust-name], ARDetailAging.[slsm-number],
ARDetailAging.[PO-Num], NAMEADDR.ca
FROM ARDetailAging LEFT JOIN NAMEADDR ON ARDetailAging.[cust-name] =
NAMEADDR.[customer name]
ORDER BY ARDetailAging.[co-number], ARDetailAging.[cust-number],
ARDetailAging.[ref-number];