Joseph Michael Pesch
VP Programming

SQL Select Statement to Calculate Monthly Loan Payment

by 27. January 2014 08:15

The following SQL statement will calculate a monthly loan payment (principal and interest).

select CalculatedPmt =
  cast(
    LoanAmount
      / (power(1+((NoteRate*.01)/cast(12 as float)),LoanTermMonths)-1)
      * (((NoteRate*.01)/cast(12 as float))
      * power(1+((NoteRate*.01)/cast(12 as float)),LoanTermMonths))
    as decimal(10,2))

Tags:

SQL Server

SSAS Cube Queries to Extract Cube Measures, Dimensions, Attributes, etc.

by 1. January 2014 19:50

Tags:

SSAS