J'ai la situation ci-dessous (disons tblRecord)Impossible d'utiliser la clause ORDER BY avec pour le chemin xml correctement (serveur Sql)
ID RowNum Data
1 1 and seventy nine
1 2 five hundred
1 3 two thousand
J'ai besoin que la sortie soit
ID Data
1 two thousand five hundred and seventy nine
Je la ci-dessous requête
select ID , Data =
(Select ' ' + cast(Data as varchar(max)) from tblRecord t2
where t2.RowNum= t1.RowNum
and t2.ID =t1.ID
order by t1.RowNum
for xml path(''))
from tblRecord t1
group by t1.ID
Mais la sortie est
ID Data
1 five hundred two thousand and seventy nine
Besoin d'aide pour cela.
Merci
A travaillé comme un charme! – rvphx