Calculations in views

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rowan

    Calculations in views

    Howdy, I am having some trouble figuring out the best way to approach
    my problem with calculations. I think I should use a view but am
    having trouble with the structure.

    My view needs to contain the sum of some calculations.

    CREATE tblINVOICE
    (
    InvoiceID bigint primary key identity not null,
    FileNumber bigint REFERENCES tblFILE(FileNum ber),
    InvoiceValue money,
    AddMMV money,
    MinusMMV money,
    MinusNDC money,
    TotalError money
    )

    If I have five invoices for a file...I need to sum the Entered Value
    for each invoice in my view.

    EnteredValue... EV = (InvoiceValue + AddMMV - MinusMMV - MinusNDC +
    TotalError)

    In my view I need field TEV = Sum(EV) where filenumber = value
Working...