How to created different dataset from Single Table

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
Back
Top