3
I have a table called SPDNFE
with a column DsXML
which contains all the contents of a Xml
.
Query:
SELECT top 1 SPDNFE.DsXML FROM SPDNFE
where SPDNFE.CdIdNFe = 'NFe32170710490181000569550040001475221002513963'
Return of this query is a Xml
as follows below.(Only part)
<vol><qVol>3</qVol><esp>VL</esp><pesoL>43.000</pesoL><pesoB>43.000</pesoB></vol>
How I search just what’s inside the tag <qVol>
that would be the number 3
.
Is there any way to substring
or something like that ?
it’s a good idea as long as the column is
varchar
. As he didn’t mention, his response would be the best option, but if the column is of the typexml
, would be better theexists
with xml xpath. Just to leave it as an alternative– Ricardo Pontual
@Ricardopunctual I put a note regarding this
– Sorack
I tried but it is very slow to query how to read the entire table that has a lot of record is unviable with like.
– KevinF