我正在尝试创建一个存储过程,接受 XML数据作为输入参数但无法进行编译.代码: CREATE PROCEDURE dbo.idn_UpdateUserApplications( @AppIdList xml, @UserID nvarchar(256), @ModifiedBy nvarchar(256))ASBEGIN SET NOCOUNT
CREATE PROCEDURE dbo.idn_UpdateUserApplications ( @AppIdList xml, @UserID nvarchar(256), @ModifiedBy nvarchar(256) ) AS BEGIN SET NOCOUNT ON INSERT INTO userapplication (userid, modifiedby, modifiedon, appid) SELECT @UserID as userid, @ModifiedBy As modifiedby, Getdate() as modifiedon, paramvalues.id.VALUE('.', 'VARCHAR(20)') AS appid FROM @AppIdList.NODES('/Applications/id') AS paramvalues(ID) END
错误:
消息317,级别16,状态1,过程idn_UpdateUserApplications,第13行
表值函数“NODES”不能具有列别名.