Rattlesnake
Well-known member
- Joined
- Dec 23, 2003
- Messages
- 47
Hi, I am working on a Sales Order Confirmation ASP.net application (Sql Server 2000). In this application there is an Excel file that has to be uploaded every month that contains the Sales FORECAST given by all our Customers for the next 12 months.
It has the following format (these will be the columns of the excel sheet)
CustomerId
ProductID
Year
Jan
Feb
March
April
...
...
Dec
In the JAN to DEC columns the Customer specifies its forecast for that month.
I would like to know the best Database structure that I should use for importing this excel file. The easiest way would be
create a table with a structure similar to the excel file, but what I will require later will be a lot of Queries that would
group on ProductID and Customer ID. Reports like the Customers FORECAST vs Actual Orders per month, trend for a Product for
the past 3 months etc.
I would like your suggestion on the IDEAL Table structure to use and how to IMPORT the Excel file into that table structure.
My idea was something like this
Master Forecast Table
---------------------
ID
CustomerID
ProductID
Detail Forecast Table
---------------------
ID (foreign Key)
Month
Year
ForeCastQuantity
Thus each row from the Excel File, will have 12 rows (jan to dec) in the Detail Forecast Table.
Am I on the right track ?????
If this OK, what is the best way to convert the Excel file into this format???
It has the following format (these will be the columns of the excel sheet)
CustomerId
ProductID
Year
Jan
Feb
March
April
...
...
Dec
In the JAN to DEC columns the Customer specifies its forecast for that month.
I would like to know the best Database structure that I should use for importing this excel file. The easiest way would be
create a table with a structure similar to the excel file, but what I will require later will be a lot of Queries that would
group on ProductID and Customer ID. Reports like the Customers FORECAST vs Actual Orders per month, trend for a Product for
the past 3 months etc.
I would like your suggestion on the IDEAL Table structure to use and how to IMPORT the Excel file into that table structure.
My idea was something like this
Master Forecast Table
---------------------
ID
CustomerID
ProductID
Detail Forecast Table
---------------------
ID (foreign Key)
Month
Year
ForeCastQuantity
Thus each row from the Excel File, will have 12 rows (jan to dec) in the Detail Forecast Table.
Am I on the right track ?????
If this OK, what is the best way to convert the Excel file into this format???