SQL Statement in Access

W

WordLoser

I am looking to run a query on the following.

1. The first column in my table contains Customer Numbers.
2. The second column in my table contains Circuit IDs (these are all unique)
3. In many cases, there are multiple Circuit IDs per Customer Number.
4. The third column in my table contains Cost for each unique Circuit ID
5. In many cases, there is no value populated in the Cost field.

I would like to be able to run a query that returns ONLY Customer Numbers
whereby ALL the Cost fields have been populated with a value. I would like
the query to include the total value of the Cost field.

I am new to this and have attempted an SQL statement, but no luck thus far.
Please help.

Todd
 
D

Dan

Select Customer_Number (add other fields wanted to return)
From <table_name>
Where Cost = not null

Syntax of the where statement may be a bit different (don't feel like
looking it up :p)

If you want do not want the same customer name being repeated:

Select distinct Customer_Name (add other fields wanted)
From <table_name>
Where Cost = not null
 

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