Usp_INS_UPD_companyperformance ... [英] Usp_INS_UPD_companyperformance...

查看:83
本文介绍了Usp_INS_UPD_companyperformance ...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

usp_INS_UPD_CompanyPerformanceMetrics指定了太多参数



我尝试过:



usp_INS_UPD_CompanyPerformanceMetrics has too many arguments specified

What I have tried:

USE [ValueStock]
GO
/****** Object:  StoredProcedure [dbo].[usp_INS_UPD_CompanyPerformanceMetrics]    Script Date: 8/10/2016 10:45:34 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[usp_INS_UPD_CompanyPerformanceMetrics]
@IsInsert bit,
@CompanyPerformanceMetricsID        int,
@StockID                            int = NULL,
@Year                               int = NULL,
@Date                               date = NULL,
@GrossProfitMargin                  float = NULL,
@OperatingProfitMargin              float = NULL,
@NetProfitMargin                    float = NULL,
@ReturnOnEquity                     float = NULL,
@FreeCashFlow                       float = NULL,
@CurrentRatio                       float = NULL,
@InterestCoverageRatio              float = NULL,
@DebtToEquityRatio                  float = NULL,
@Revenue                            float = NULL,
@GrossProfit                        float = NULL,
@NetProfit                          float = NULL,
@NetIncome                          float = NULL,
@CashFromOperations                 float = NULL,
@TotalNumberOfShares                float = NULL,
@Debt                               float = NULL,
@Reserves                           float = NULL,
@Dividend                           float = NULL,
@DPS                                float = NULL,
@Receivables                        float = NULL,
@Inventory                          float = NULL,
@DSO                                float = NULL,
@BookValue                          float = NULL,
@EPS                                float = NULL,
@NetWorth                           float = NULL,
@InvestmentInOperationalCapital     float = NULL,
@IsActive                           bit = NULL,
@CreationDate                       date = NULL,
@LastUpdateDate                     date = NULL
AS

If(@IsInsert = 'False')
BEGIN
 
UPDATE dbo.CompanyPerformanceMetrics
   SET StockID                            = @StockID,
       Year                               = @Year,
       Date                               = @Date,
       GrossProfitMargin                  = @GrossProfitMargin,
       OperatingProfitMargin              = @OperatingProfitMargin,
       NetProfitMargin                    = @NetProfitMargin,
       ReturnOnEquity                     = @ReturnOnEquity,
       FreeCashFlow                       = @FreeCashFlow,
       CurrentRatio                       = @CurrentRatio,
       InterestCoverageRatio              = @InterestCoverageRatio,
       DebtToEquityRatio                  = @DebtToEquityRatio,
       Revenue                            = @Revenue,
       GrossProfit                        = @GrossProfit,
       NetProfit                          = @NetProfit,
       NetIncome                          = @NetIncome,
       CashFromOperations                 = @CashFromOperations,
       TotalNumberOfShares                = @TotalNumberOfShares,
       Debt                               = @Debt,
       Reserves                           = @Reserves,
       Dividend                           = @Dividend,
       DPS                                = @DPS,
       Receivables                        = @Receivables,
       Inventory                          = @Inventory,
       DSO                                = @DSO,
       BookValue                          = @BookValue,
       EPS                                = @EPS,
       NetWorth                           = @NetWorth,
       InvestmentInOperationalCapital     = @InvestmentInOperationalCapital,
       IsActive                           = @IsActive,
       CreationDate                       = @CreationDate,
       LastUpdateDate                     = @LastUpdateDate
 WHERE CompanyPerformanceMetricsID = @CompanyPerformanceMetricsID
 
 
END
ELSE
BEGIN
 
INSERT INTO dbo.CompanyPerformanceMetrics
(StockID, Year, Date, GrossProfitMargin, OperatingProfitMargin, NetProfitMargin, ReturnOnEquity, FreeCashFlow, CurrentRatio, InterestCoverageRatio, DebtToEquityRatio, Revenue, GrossProfit, NetProfit, NetIncome, CashFromOperations, TotalNumberOfShares, Debt, Reserves, Dividend, DPS, Receivables, Inventory, DSO, BookValue, EPS, NetWorth, InvestmentInOperationalCapital, IsActive, CreationDate, LastUpdateDate)
Values ( @StockID, @Year, @Date, @GrossProfitMargin, @OperatingProfitMargin, @NetProfitMargin, @ReturnOnEquity, @FreeCashFlow, @CurrentRatio, @InterestCoverageRatio, @DebtToEquityRatio, @Revenue, @GrossProfit, @NetProfit, @NetIncome, @CashFromOperations, @TotalNumberOfShares, @Debt, @Reserves, @Dividend, @DPS, @Receivables, @Inventory, @DSO, @BookValue, @EPS, @NetWorth, @InvestmentInOperationalCapital, @IsActive, @CreationDate, @LastUpdateDate)
 
END

推荐答案

查看您调用它的位置,并计算您提供的参数数量:错误消息是说调用代码提供了太多的值,SQL不知道如何处理它们。
Look at where you call it, and count the number of parameters you supply: the error message is saying that the calling code is providing too many values and SQL doesn't know what to do with some of them.


这篇关于Usp_INS_UPD_companyperformance ...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆