Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calculate in a view?

Status
Not open for further replies.

jazminecat

Programmer
Jun 2, 2003
289
US
Hi, I have the following in a view, which produces correct results thus far:

SELECT AGAN8, AGALPH, AGBHBB AS BegBal, AG#XC1 AS Taken,
AGPDBA
FROM Finance_Admin.JailSummary
WHERE (AGPDBA BETWEEN N'8200' AND N'8299')

Now I want another column that takes the number in BegBal, Subtracts Taken, and returns a new number.

I am unfamiliar with ADP, work mostly with access and vba, so any help you can provide would be greatly appreciated.
Thanks!
 
I figured it out. Here's what i got, in case anyone else needs the syntax:

Code:
SELECT AGAN8, AGALPH, AGPDBA AS Type, AGBHBB AS BegBal, 
    AG#XC1 AS Taken, AGBHBB - AG#XC1 AS EndingBalance
    
FROM Finance_Admin.JailSummary
WHERE (AGPDBA BETWEEN N'8200' AND N'8299')

easy peasy!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top