mirror of
https://github.com/acedanger/budget-database.git
synced 2025-12-05 14:40:14 -08:00
19 lines
368 B
Transact-SQL
19 lines
368 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 Id, TrxDate, TrxDate_ISO8601, TrxDescription, TrxAmount, RunningBal
|
|
from dbo.vw_BudgetRunningBalance
|
|
where
|
|
YEAR(TrxDate) = @yr
|
|
and MONTH(TrxDate) = @mo
|
|
end
|
|
go
|