How to created different dataset from Single Table

G

Guest

Hi, i want to create different dataset by grouping records based on
condition. I want to break this data in different set of records run time for
calculation purpose, is it possible using some loop structure ?

My Table has field Month,Sales

Customer-Month-Sales
X-2007/01-10000
X-2007/02-20000
Y-2007/02/60000

Thanx
 
M

Marshall Barton

Max said:
Hi, i want to create different dataset by grouping records based on
condition. I want to break this data in different set of records run time for
calculation purpose, is it possible using some loop structure ?

My Table has field Month,Sales

Customer-Month-Sales
X-2007/01-10000
X-2007/02-20000
Y-2007/02/60000


When working with a database, the way to operate on the data
in tables is to use queries. Ocassionally, you may need to
use a VBA procedure to do something, but code is rarely a
good way to solve a problem.

I don't understand what you want to do, but a simple example
to get the total sales per month for each customer would be
a query like:

SELECT Customer, Month, Sum(Sales) As MonthSales
FROM yourtable
GROUP BY Customer, Month
 

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