Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Design table

Author  Topic 

nkpriya
Starting Member

34 Posts

Posted - 2009-11-16 : 12:57:07
Hi,
I am planning to design a database and am not sure how to start.

I have a requirement like below:

1)Every month, I will have MTD values for GL Accounts.
2)Next Month, sometimes MTD values change for the previous months too, however, I need to show the previous MTD values in the previous month report and current MTD for previous month in the current month report.

Ex: In the month of January, I will have some MTD values for GL Accounts and that has to reflect on January report.

And In the month of February, there will be some changes for January values. But, I need to show original values in January month report and February YTD report has to show current values for February and changed ones for the month of January.

Please help me in designing table.

Thanks
Krishna

X002548
Not Just a Number

15586 Posts

Posted - 2009-11-16 : 13:10:59
Sounds like you are talking about derived data

Can you get your hands on the Ledger Entry Details?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

nkpriya
Starting Member

34 Posts

Posted - 2009-11-16 : 13:14:57
No, I cannot. What I need to do is download data from SAP Business Objects each month to Excel and upload to SQL Server and then tweak it to produce the desired reports.
Thanks
Krishna
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2009-11-16 : 13:20:32
OK then

Can you post what Data you will have

What you should do though...is take the "data" as is and load it to a staging table that matches is the data as is, with no manipulation

Once it's loaded, we can then discuss what to do with it



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

nkpriya
Starting Member

34 Posts

Posted - 2009-11-16 : 13:48:35
Here is the example of data:

January data:
GL Account Desc| CC No.|CCname|Division Name|Month|Transaction Desc.|Credit Amt|Debit Amt|Total Amt

In the final report again in excel(pivot report) -
I should have filtered by Month:
GL Account Desc|Total Amt

Thanks
Krishna

Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2009-11-16 : 14:13:31
SELECT Month, [GL Account Desc], SUM([Total Amt])
FROM TableName
GROUP BY Month, [GL Account Desc]
ORDER BY Month, [GL Account Desc]

?????



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -