mirror of
https://github.com/acedanger/budget-database.git
synced 2025-12-05 22:50:13 -08:00
moving to postgres
This commit is contained in:
18
mysql/procedures/proc_GetTransactions.sql
Normal file
18
mysql/procedures/proc_GetTransactions.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
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
|
||||
Reference in New Issue
Block a user