Files
budget-database/procedures/proc_GetTransactions.sql
2022-08-02 06:12:02 -04:00

19 lines
371 B
Transact-SQL

use Leo
go
alter proc dbo.proc_GetTransactions (
@yr smallint = null, @mo smallint = null
)
as
begin
set @yr = isnull(@yr, year(getdate()))
set @mo = isnull(@mo, month(getdate()))
select TrxId, TrxDate, TrxDate_ISO8601, TrxDescription, TrxAmount, RunningBal
from dbo.vw_BudgetRunningBalance
where
YEAR(TrxDate) = @yr
and MONTH(TrxDate) = @mo
end
go