XML FileXQuery durante l'utilizzo di distinti valori()
<Cities>
<Place>
<City n="New Delhi"></City>
<City n="Chandigarh"></City>
<City n="Mumbai"></City>
</Place>
<Place>
<City n="New Delhi"></City>
<City n="Chandigarh"></City>
</Place>
<Place>
<City n="New Delhi"></City>
<City n="Mumbai"></City>
</Place>
</Cities>
Sto usando seguente XQuery -
for $x in doc("sample")/Cities/Place/City
order by $x/@n
return distinct-values($x/@n)
Il risultato mi aspetto è - Chandigarh Mumbai New Delhi
ma ottenere - Chandigarh Chandigarh Mumbai Mumbai New Delhi New Delhi New Delhi
Per favore dimmi dove sto andando male?
@ John-It ha funzionato esattamente come mi aspettavo. Grazie mille –
@ pratik- benvenuto caro :) – John