File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed
020_DIRECT_Framework/Direct_Framework Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 142142 <Build Include =" Functions\omd.GetFailedBatchIdList.sql" />
143143 <Build Include =" Functions\omd.GetPreviousBatchInstanceDetails.sql" />
144144 <Build Include =" Stored Procedures\omd.CreateLoadWindow.sql" />
145+ <Build Include =" Functions\GetModuleAreaByModuleId.sql" />
145146 </ItemGroup >
146147 <ItemGroup >
147148 <PostDeploy Include =" Scripts\Script.PostDeployment.sql" />
Original file line number Diff line number Diff line change 1+ CREATE FUNCTION omd .GetModuleAreaByModuleId
2+ (
3+ @ModuleId INT -- The identifier of the Module (PK).
4+ )
5+ RETURNS VARCHAR (255 ) AS
6+
7+ -- =============================================
8+ -- Function: Get Module Area (by Id)
9+ -- Description: Takes the module id as input and returns the area code as registered in the framework
10+ -- =============================================
11+
12+ BEGIN
13+ -- Declare ouput variable
14+
15+ DECLARE @ModuleArea VARCHAR (255 ) =
16+ (
17+ SELECT module .AREA_CODE
18+ FROM omd .MODULE module
19+ WHERE MODULE_ID = @ModuleId
20+ )
21+
22+ SET @ModuleArea = COALESCE (@ModuleArea,' N/A' )
23+
24+ -- Return the result of the function
25+ RETURN @ModuleArea
26+ END
You can’t perform that action at this time.
0 commit comments