SQL function call

xiaoxiao2021-03-06  107

The function is as follows

CREATE FUNCTION StockBalance_AmountIn (@SortID int) RETURNS numeric (18,4) AS BEGIN Declare @dblReturn numeric (18,4) Select @dblReturn = SUM (AmountCurrentMonthIn) From AT_Materiel_StockBalance Where SortID = @SortID Return (@dblReturn) END

Call method Select dbo.stockbalance_amountin (2523)

Here you need to add DBO

转载请注明原文地址:https://www.9cbs.com/read-96999.html

New Post(0)