草庐IT

PurchaseState

全部标签

xml - XQuery [value()] : 'value()' requires a singleton (or empty sequence), 找到类型为 'xdt:untypedAtomic *' 的操作数

我正在尝试使用从XML中选择的内容将行插入到表中。我想我很接近了。我哪里错了?declare@xmldataxml;set@xmldata='72594206916779/2010DallasTX725942218543312/2013NashvilleTN'insertintoPurchaseDetails(Upc,Quantity,PurchaseDate,PurchaseCity,PurchaseState)selectx.Rec.value('Upc','char(11)'),x.Rec.value('Quantity','int'),x.Rec.value('Purchase