Number comparison

C

CB100

Good morning,
I have 2 tables that I need to compare customer numbers. One table is for
customers that the product was sold to.
One table is for product returned by customers.
The customer number in the sold to table has 8 mumbers with the last 3
being location.
The returned product customer number is entered in as the first 6 numbers.
When I compare the sold to table with the returns, I want to show all
original customers that has returned product.
I run a query for Unmatched using the customer number of the sales and
returns. I dont know how to enter criteria to overlook the last 2 numbers
and just look at the 6.
I hope this is enough information for you to help me but let me know if you
need more.
Thank you
 
T

Tom van Stiphout

On Wed, 10 Dec 2008 06:21:01 -0800, CB100

Open that query in design view, and anywhere where it says
CustomerNumber, change it to:
Left(CustomerNumber, 6)

For the future: You are abusing the Customer number field by also
storing location there. Rather store that in two fields.

-Tom.
Microsoft Access MVP
 
C

CB100

When I entered that into the criteria space in that in, it removes all of
the accounts that has 8 digets. I want to show all accounts, but just for
the just the first 6 digits.
This is information is from SAP with 2 groups entering the data. So I have
to compare and do what I can.
Thank you
 

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

Top