Hallo again!!
You have right. I must first run the vb code to get the ref_number for each raw and then I can run the cool-xml code!! Without the generated ref_number the xml code doesnt work. As an sql freak I am very excited with this xml code, its really a new way!!! Thanks again!!:-):-):-):-)
And I dont have in the first place a ref_number. My raw data is-->
SELECT 'H;123442;23%;78.99;52000990889'
UNION ALL SELECT 'L;socks;blue;100'
UNION ALL SELECT 'L;socks;red;200'
UNION ALL SELECT 'H;123443;23%;500.99;52000990111'
UNION ALL SELECT 'L;skirt;blue;100'
UNION ALL SELECT 'L;pants;red;200'