我执行以下存储过程,但出现了错误。错误信息为“'.' 附近的语法不正确”,即在 'xmlFields.Country' 中显示错误。请查看此存储过程并帮助我,谢谢。
create procedure sp_SuUpdateSUADUsersStatus
(
@FinalEMPCode nvarchar(50),
@xmlFields NTEXT
)
AS
DECLARE @CityIDReturn INT
SET NOCOUNT ON
BEGIN
DECLARE @hdoc INT
EXEC sp_xml_preparedocument @hdoc OUTPUT, @xmlFields
BEGIN
EXEC @CityIDReturn=sp_SuSaveADUsersLocation @Country=xmlFields.Country,
xmlFields.State,xmlFields.City
FROM OPENXML(@hDoc, 'EmpCode/User', 2) WITH
(Country nvarchar(500),State nvarchar(500),City nvarchar(500))
as xmlFields
where xmlFields.Country <>'' and xmlFields.State <>'' and xmlFields.City
<>'')
END
EXEC sp_xml_removedocument @hdoc
End