我的XML
<ProductPurchasePlaceDealRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ClientReference>0000000000GOOA106664</ClientReference>
<TransactionReference>31966963</TransactionReference>
<TransactionDescription>NWGHIB00348966</TransactionDescription>
<TemplateClientReference>00000000000000000FNW</TemplateClientReference>
<TemplateReference>ISMPURCHASE</TemplateReference>
<Amount>5862119</Amount>
<PaymentAmount>0</PaymentAmount>
<PayerClientReference>00000000000000000FNW</PayerClientReference>
<PayerAccountType>OMN</PayerAccountType>
<PayerCurrency>GBP</PayerCurrency>
</ProductPurchasePlaceDealRequest>
我的查询
select
convert(xml,RequestXML.value('(/ProductPurchasePlaceDealRequest/Amount)[1]', 'varchar(20)'))
from
WebServicesAudit
where
id = '9F38D211-9D67-43E4-B0C0-493BA2B84313'
and
RequestXML.value('(/ProductPurchasePlaceDealRequest/Amount)[1]', 'varchar(20)') = '5862119'
金额显示为NULL。有什么我想念的吗? 该字段的基础数据类型是xml,但我认为无论如何我都要转换它,只是加入