USE [ARTEA.MES] GO /****** Object: UserDefinedFunction [dbo].[UnionPart] Script Date: 11/18/2015 15:39:34 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: <Author,,Name> -- Create date: <Create Date, ,> -- Description: <Description, ,> -- ============================================= ALTER FUNCTION [dbo].[UnionPart] ( -- Add the parameters for the function here @OrderNo varchar(30) ) RETURNS [nvarchar](4000) AS BEGIN -- Declare the return variable here DECLARE @ReturnValue [nvarchar](4000) SET @ReturnValue = '' -- Add the T-SQL statements to compute the return value here SELECT @ReturnValue=@ReturnValue + RTRIM(LTRIM(c.PartName)) + ',' FROM table1 c left join table2 d on d.OrderID=c.OrderID WHERE d.OrderNO = @OrderNo SET @ReturnValue = substring(@ReturnValue,1,len(@ReturnValue)-1) RETURN @ReturnValue END GO
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号