Tengo una tabla en SQL que tiene dos campos (id
, xml
), solo mirando mi campo XML, la fila es así:
<Sheet1>
<Production_x0020_Line>L1B4</Production_x0020_Line>
<Item_x0020_Number>VPJG7F-10849-BD</Item_x0020_Number>
<Fecha>02/20 - 02/26</Fecha>
<cantidad>2</cantidad>
</Sheet1>
<Sheet1>
<Production_x0020_Line>L1B4</Production_x0020_Line>
<Item_x0020_Number>VPJG7F-10849-DD</Item_x0020_Number>
<Fecha>02/20 - 02/26</Fecha>
<cantidad>1</cantidad>
</Sheet1>
Me gustaría que se vieran en una tabla normal en SQL como esto:
Production line Item Number Date Cantidad
L1B4 VPJG7F10849BD 02/20 2
L1B4 VPJG7F10849DD 02/20 1
Teniendo los datos en una tabla poder hacer una consulta y seleccionar L1B4
y que se sumen las cantidades 2 y 1, o me gustaría saber si hay alguna otra forma de hacerlo.
Item_x0020_Number
del primer elemento.