UFN_ACCOUNTSEQUENCE
Returns account sequence
Return
| Return Type |
|---|
| table |
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @ACCOUNTSYSTEMID | uniqueidentifier | IN |
Definition
Copy
CREATE function dbo.UFN_ACCOUNTSEQUENCE(@ACCOUNTSYSTEMID uniqueidentifier = null)
returns table
as return
select
TOP 30 ID,
DESCRIPTION,
LENGTH,
SEGMENTSEQUENCE
from
dbo.PDACCOUNTSTRUCTURE
where ELEMENTTYPECODE = 1 and
PDACCOUNTSYSTEMID = isnull(@ACCOUNTSYSTEMID, '4B121C2C-CCE6-440D-894C-EA0DEF80D50B') and
ISBASICGL = 0
order by SEGMENTSEQUENCE