USP_DATALIST_BANKACCOUNTDEPOSITNOTES
This datalist returns all notes for a bank account deposit.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@DEPOSITID | uniqueidentifier | IN | Input parameter indicating the context ID for the data list. |
@NOTETYPECODEID | uniqueidentifier | IN | Type |
@TITLE | nvarchar(50) | IN | Title |
Definition
Copy
CREATE procedure dbo.USP_DATALIST_BANKACCOUNTDEPOSITNOTES
(
@DEPOSITID uniqueidentifier = null,
@NOTETYPECODEID uniqueidentifier = null,
@TITLE nvarchar(50) = ''
)
as
set nocount on;
select
BANKACCOUNTDEPOSITNOTE.ID,
BANKACCOUNTDEPOSITNOTE.DATEENTERED,
BANKACCOUNTDEPOSITNOTETYPECODE.DESCRIPTION,
BANKACCOUNTDEPOSITNOTE.TITLE,
NF.NAME
from
dbo.BANKACCOUNTDEPOSITNOTE
inner join dbo.BANKACCOUNTDEPOSITNOTETYPECODE on BANKACCOUNTDEPOSITNOTETYPECODE.ID = BANKACCOUNTDEPOSITNOTE.BANKACCOUNTDEPOSITNOTETYPECODEID
outer apply dbo.UFN_CONSTITUENT_DISPLAYNAME(BANKACCOUNTDEPOSITNOTE.AUTHORID) NF
where
BANKACCOUNTDEPOSITNOTE.DEPOSITID = @DEPOSITID and
(@NOTETYPECODEID is null or BANKACCOUNTDEPOSITNOTE.BANKACCOUNTDEPOSITNOTETYPECODEID = @NOTETYPECODEID) and
(@TITLE = '' or BANKACCOUNTDEPOSITNOTE.TITLE like @TITLE + '%')
order by
BANKACCOUNTDEPOSITNOTE.DATEENTERED desc;