PDC_REPORT_CreazioneDB/sql/Collaudo bfdskrepsei02c/procedure/dbo_sp_getMenuElements_ByParentID.sql
2025-06-26 18:47:11 +02:00

10 lines
287 B
Transact-SQL

CREATE PROCEDURE [dbo].[sp_getMenuElements_ByParentID]
@pID as int
AS
BEGIN
select id,page_name,(select count(*) FROM tTreeview WHERE parentid=sc.id) childnodecount,
logical_name,
aspxPagePath
FROM tTreeview sc where parentID=@pID
ORDER BY position
END