Hi everybody. My XML file is:   
      
    001   
    CSTNDA69P90H523R   
       
    CAST   
    NADIR   
    F   
    10091979   
    RONCA   
    BL   
       
      
      
    002   
    PRSGRI74L29F443L   
       
    PERISSI   
    IGOR   
    M   
    29071970   
    MONTE   
    SA   
       
      
      
   I need to get in ONE RECORD, both node value and his child nodes values, like   
   this   
   001 | CSTNDA69P90H523R | CAST | NADIR | F | 10091979 | RONCA | BL   
   002 | PRSGRI74L29F443L | PERISSI | IGOR | M | 29071970 | MONTE | SA   
   ....   
      
   With this:   
   SELECT   
   X.valore.query('NumeroProgressivo').value('.', 'VARCHAR(20)') as   
   NumeroProgressivo,   
   X.valore.query('CodiceFiscale').value('.', 'VARCHAR(16)') as CodiceFiscale   
      
   FROM Tbulk   
   CROSS APPLY Tbulk.nodes('Fornitura/Documento/Soggetti/PrimoModulo/Locatore')   
   AS X(valore);   
      
   I only get the first node values (NumeroProgressivo, CodiceFiscale), but not   
   the child nodes (cognome, nome sesso...)   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|