Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Financial Calculations in SQL Expand / Collapse
Author
Message
Posted Monday, April 14, 2014 10:47 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Yesterday @ 10:15 AM
Points: 23, Visits: 96
Could someone please share some information and some links on writing stored procedures for the calculation of different Financial information such as depreciation, Cost Analysis, Expense Forecasting, ect...

I have been searching and not really finding anything for SQL.

I believe on the Depreciation side, I am going to have the Depreciation schedule calculated when a new vehicle is entered and then store the depreciation schedule in the database. It seems like that makes more sense than recalculating it on the fly.

I am not sure about forecasting, is cost forecassting similar to sales forecasting?

Any help in this area would be appreciated.

Post #1561573
Posted Monday, April 14, 2014 11:28 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 11:11 AM
Points: 7,122, Visits: 15,031
I'm not surprised that you haven't found much, because I think you're asking the wrong question. SQL Server is a general purpose RDBMS, so it understands how to store, retrieve and update data, while financial accounting and forecasting are fairly specific applications built on top of some data storage mechanism, with a lots of rules as to HOW to manipulate/track that info over time. You can certainly build all of those accounting/financial features into a system that uses SQL Server, but there isn't anything specific to SQL Server that would directly facilitate those features.

It's kind of like asking GM where the "self-drive to 123 main street in Newark NJ" button is on one of their cars. The car can certainly take your there - but you have to work to *make* the car get you there.


----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
Post #1561588
Posted Monday, April 14, 2014 11:44 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Yesterday @ 10:15 AM
Points: 23, Visits: 96
Well in this shop, data is stored and these are the topics I have to report off of. All SQL, no front in application to sit on top.

Simple Depreciation is easy to calculate, and store. the rest I am still looking, hopefully someone out there has had to do this.

Post #1561601
Posted Monday, April 14, 2014 12:05 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 1:14 PM
Points: 13,139, Visits: 11,980
swoozie (4/14/2014)
Well in this shop, data is stored and these are the topics I have to report off of. All SQL, no front in application to sit on top.

Simple Depreciation is easy to calculate, and store. the rest I am still looking, hopefully someone out there has had to do this.



SQL Server does not have these built in functions for complex accounting calculations. You have to calculate and store this information yourself.

Things like Cost Analysis and Expense Forecasting are immensely complicated and have lots and lots of business rules for each company that wants this type of thing. You can write all of that into a stored procedure or something but you have to first identify what those rules are.


_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1561620
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse