SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Financial Calculations in SQL


Financial Calculations in SQL

Author
Message
swoozie
swoozie
SSC Veteran
SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)

Group: General Forum Members
Points: 292 Visits: 438
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.
Matt Miller (4)
Matt Miller (4)
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12359 Visits: 18574
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?
swoozie
swoozie
SSC Veteran
SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)

Group: General Forum Members
Points: 292 Visits: 438
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.
Sean Lange
Sean Lange
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26245 Visits: 17552
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 Modens 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)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search