1个回答
展开全部
你的SQL语句有问题,SUM(QUETITY) QUETITY 是 SUM(QUETITY) AS QUETITY 吧 CREATE PROCEDURE [dbo].[存储过程名] @GHSNAME nvarchar(?) AS BEGIN EXEC('IF EXISTS (SELECT * FROM sysviews WHERE object_id = ''[dbo].[视图名]'') DROP VIEW [dbo].[视图名]') EXEC('CREATE VIEW [dbo].[视图名] AS SELECT [PDNAME],SUM(QUETITY) AS [QUETITY] FROM RCXXJL WHERE [PDNAME]=''显示器'' AND [GHSNAME]='''+@GHSNAME+'''') END
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询