USP_DATALIST_BANKACCOUNTDEPOSITCORRECTIONNOTES
This datalist returns all notes for a bank account deposit correction.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@DEPOSITCORRECTIONID | 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_BANKACCOUNTDEPOSITCORRECTIONNOTES
(
@DEPOSITCORRECTIONID uniqueidentifier = null,
@NOTETYPECODEID uniqueidentifier = null,
@TITLE nvarchar(50) = ''
)
as
set nocount on;
select
BANKACCOUNTDEPOSITCORRECTIONNOTE.ID,
BANKACCOUNTDEPOSITCORRECTIONNOTE.DATEENTERED,
DEPOSITCORRECTIONNOTETYPECODE.DESCRIPTION,
BANKACCOUNTDEPOSITCORRECTIONNOTE.TITLE,
NF.NAME
from
dbo.BANKACCOUNTDEPOSITCORRECTIONNOTE
inner join dbo.DEPOSITCORRECTIONNOTETYPECODE on DEPOSITCORRECTIONNOTETYPECODE.ID = BANKACCOUNTDEPOSITCORRECTIONNOTE.DEPOSITCORRECTIONNOTETYPECODEID
outer apply dbo.UFN_CONSTITUENT_DISPLAYNAME(BANKACCOUNTDEPOSITCORRECTIONNOTE.AUTHORID) NF
where
BANKACCOUNTDEPOSITCORRECTIONNOTE.DEPOSITCORRECTIONID = @DEPOSITCORRECTIONID and
(@NOTETYPECODEID is null or BANKACCOUNTDEPOSITCORRECTIONNOTE.DEPOSITCORRECTIONNOTETYPECODEID = @NOTETYPECODEID) and
(@TITLE = '' or BANKACCOUNTDEPOSITCORRECTIONNOTE.TITLE like @TITLE + '%')
order by
BANKACCOUNTDEPOSITCORRECTIONNOTE.DATEENTERED desc;