22,277
社区成员
发帖
与我相关
我的任务
分享
exec sp_eip1_GetTabs '','N''''WMM''''',N'''DRP''',N'''EQP''',N'''WMC'''
--这样调用:
exec sp_eip1_GetTabs '', '''N''''WMM'''',N''''DRP'''',N''''EQP'''',N''''WMC'''''
create procedure [dbo].[sp_eip1_GetTabs]
(
@PShowMobile nvarchar,
@PHidModCodes nvarchar(500)
)
as
begin
declare
@DTabID int,
@DTabName nvarchar(50),
@szSqlSel nvarchar(500),
@szSqlWhr nvarchar(500),
@szSqlOrd nvarchar(500)
create table #NodeTB(TabID int,TabName sysname)
select @szSqlSel='select TabID from Tabs'
select @szSqlWhr=' where dbo.fn_eip1_HasTabRight2(TabID,3,'''+@PHidModCodes+''')=N''Y'''
insert #NodeTB(TabID,TabName) execute(@szSqlSel+@szSqlWhr)
select * from #NodeTB
end
--try
exec('select'+ @iPortalID+'=PortalID from Tabs where TabID='+@iPTabID+' and TabMode in ('+@PHidModCodes+')')