load XML TO SQL Server table

Anonymous
2023-08-18T11:21:11.2333333+00:00
I created the table and want to load alim_2020_07_07.xml  to ALIM

CREATE TABLE [dbo].[ALIM](
	[alim_code] [int] NOT NULL,
	[alim_nom_fr] [varchar](20) NOT NULL,
	[ALIM_NOM_INDEX_FR] [varchar](50) NOT NULL,
	[alim_nom_eng] [varchar](50) NOT NULL,
	[alim_grp_code] [varchar](20) NOT NULL,
	[alim_ssgrp_code] [varchar](20) NOT NULL,
	[alim_ssssgrp_code] [varchar](20) NOT NULL
) ON [PRIMARY]
GO
alim_2020_07_07.xml


<?xml version="1.0" encoding="windows-1252" ?>
<TABLE>
   <ALIM>
      <alim_code> 1000 </alim_code>
      <alim_nom_fr> Pastis </alim_nom_fr>
      <ALIM_NOM_INDEX_FR> Pastis </ALIM_NOM_INDEX_FR>
      <alim_nom_eng> Pastis (anise-flavoured spirit) </alim_nom_eng>
      <alim_grp_code> 06 </alim_grp_code>
      <alim_ssgrp_code> 0603 </alim_ssgrp_code>
      <alim_ssssgrp_code> 060303 </alim_ssssgrp_code>
   </ALIM>
   <ALIM>
      <alim_code> 1001 </alim_code>
      <alim_nom_fr> Eau de vie </alim_nom_fr>
      <ALIM_NOM_INDEX_FR> Eau de vie </ALIM_NOM_INDEX_FR>
      <alim_nom_eng> Clear fruit brandy or eau-de-vie </alim_nom_eng>
      <alim_grp_code> 06 </alim_grp_code>
      <alim_ssgrp_code> 0603 </alim_ssgrp_code>
      <alim_ssssgrp_code> 060303 </alim_ssssgrp_code>
   </ALIM>
</TABLE>
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,312 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,892 questions
0 comments No comments
{count} votes

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2023-08-18T12:38:57.3166667+00:00

    @AgaveJoe

    I used Azure Data Studio it has some nice options to export to JSON,XML & CSV

    2 people found this answer helpful.
    0 comments No comments