Access 2002: Selecting necessary data from several tables

  • Thread starter Thread starter D.M
  • Start date Start date
D

D.M

I have table "statistic".

I have to make next representation:



Network group
Number of calls
Number of impulse
Impulse cost
Profit




1. Network group: is first two numbers from 8 numbers from seventh field in
table called "TELEPHONE NUMBER".How to do this ?

2. Number of Calls: Total number from "START_TIME"; This I know;

3. Number of impulse:

END_TIME-START_TIME / impulse_lenght*Impulse_cost; How to do this ???



4. Impulse cost is parametar (manual enter)

5. Profit according to network group. How to do this ???



Thanks, I hope You can help me, please contact me if you need more
informations.
 
Hi D.M,

Thank you for using MSDN Newsgroup! It's my pleasure to assist you with
your issue.

This time, I could answer only part of the questions. For the first
question, actually it is very hard to do programming in Access environment
to access the filed by the sequence of the column in a table. If you use
ADO or some other ways to program, it will be more convenient. But for
queries in Access, it would be very hard.

For the 3rd and 4th question, I will give you a example. You can create a
new query in the northwind database. The query code would be:

SELECT *
FROM Products
WHERE productID=para_id;

When you execute the query, it will appear a new window for you to enter
parameter 'para_id'. So you can just use the parameters to get Impulse_cost
and execute the formula you have.

For the 5th question, I think a 'group by' method could work, it would be
like:

SELECT Sum(Profit)
FROM Products
Group by Network_group;

The information from you would be appreciate and very helpful in answer
your question. I will answer your question as your feedback returns.

Best regards

Baisong Wei
Microsoft Online Support
 
Back
Top