USP_DATAFORMTEMPLATE_VIEW_PDACCOUNTSTRUCTURE_DBSTATE
The load procedure used by the view dataform template "Account Structure View Form 2"
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@DATALOADED | bit | INOUT | Output parameter indicating whether or not data was actually loaded. |
@EXISTINGTRANSACTIONS | nchar | INOUT | EXISTINGTRANSACTIONS |
@NUMBEROFSEGMENTS | int | INOUT | NUMBEROFSEGMENTS |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_PDACCOUNTSTRUCTURE_DBSTATE
(
@DATALOADED bit = 0 output,
@EXISTINGTRANSACTIONS nchar(1) = null output,
@NUMBEROFSEGMENTS int = null output
)
as
set nocount on;
-- be sure to set this, in case the select returns no rows
set @DATALOADED = 1;
set @EXISTINGTRANSACTIONS = '0'
select @EXISTINGTRANSACTIONS = '1'
from dbo.GLACCOUNT
inner join dbo.JOURNALENTRY on JOURNALENTRY.GLACCOUNTID = GLACCOUNT.ID
option (recompile)
select @NUMBEROFSEGMENTS = dbo.UFN_PDACCOUNTSTRUCTURE_NUMBEROFSEGMENTS()
return 0;