Need help with Where Clause

T

tmaxwell

I am going to try and explain this as best possible. My database is for
Accounts Receivables. We assign new customers a company number, we have 7
Branches, each Branch has a number range between 00001 thru 9999. At the
moment they are assigned randomly. I need to track numbers used, and numbers
not used. The query I have now does track what is used, but does not include
the full range. I have been trying this with the WHERE clause, but I have not
been able to get the syntax right or I am just looking at it wrong. I will
include my qry. I left off the WHERE because it just was not correct.
Thanks

SELECT ARDetailAging.[co-number] AS Branch,
ARDetailAging.[cust-number] AS CustomerNumber,
ARDetailAging.[divn-number] AS SubBranch,
ARDetailAging.[ref-number],
ARDetailAging.[cust-name] AS CustomerName

FROM ARDetailAging LEFT JOIN NAMEADDR ON (ARDetailAging.[cust-name] =
NAMEADDR.[cust-name]) AND (ARDetailAging.[co-number] = NAMEADDR.[co-number])


ORDER BY ARDetailAging.[co-number], ARDetailAging.[cust-number],
ARDetailAging.[cust-name], ARDetailAging.[cust-number];
 
T

tmaxwell

I think what I'm looking for is an IIF Statement. How can I track what is
used between the 0001 thru 9999 range per BRANCH?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Need to write a query 5
IIF 7
WHERE -IIF ? 20
Help with Cartesian or cross joins 6
need only the records where..... 2
USING THE "IN CLAUSE" 4
Re-posting problem with Cartesian product 1
Using NULL 1

Top