SQL Server Stored Procedure: SP_Get_EOL for EOL Information Retrieval
{ "title": "SQL Server Stored Procedure: SP_Get_EOL for EOL Information Retrieval", "description": "This SQL Server stored procedure, SP_Get_EOL, retrieves EOL (End of Life) information for a specific product based on its part number and operational center. It utilizes the SP_PLM_COLPIVOT procedure for data transformation.", "keywords": "SQL Server, stored procedure, SP_Get_EOL, EOL information, PLM, Aras Innovator, SP_PLM_COLPIVOT, part number, operational center, yyzx, pinhao", "content": "CREATE PROCEDURE [dbo].[SP_Get_EOL] \t@yyzx NVARCHAR(20), --营运中心 \t@pinhao NVARCHAR(128) --品号 AS EXEC SP_PLM_COLPIVOT @TABLENAME = N'select t1.*,t2.FIELD_NAME,t2.FIELD_VALUE from Aras_PLM.innovator.LABEL_AND_EOL t1\nleft join Aras_PLM.innovator.EOL_INFO t2 on t2.SOURCE_ID = t1.id\nwhere 1 = 1\nand t1.eol_state in(''released'', ''in change'')\nand t1.old_or_new_signs = ''2''\nand t1.yyzx = @yyzx', -- Add condition to filter by yyzx @GROUPCOLUMN = N'PART_NUMBER', @JSTYPE = N'MAX', @ROW2COLUMN = N'FIELD_NAME', @ROW2COLUMNVALUE = N'FIELD_VALUE', @SQL_WHERE = N'where 1 = 1';
"}
原文地址: https://www.cveoy.top/t/topic/p3oH 著作权归作者所有。请勿转载和采集!