sql server – Copy data between tables considering foreign key relationship

I tried to use Export option from SSMS which gives an error saying failed due to foreign key relationship.

How to copy data between tables(more than 400+) of two different azure sql server with has the same schema? It’s fine to truncate data before copying the data as it is a full load.

Error:

TITLE: SQL Server Import and Export Wizard

Error 0xc002f210: Preparation SQL Task 1: Executing the query “TRUNCATE TABLE [dbo].[table_name] ”
failed with the following error: “Cannot truncate table ‘dbo.table_name’
because it is being referenced by a FOREIGN KEY constraint.”. Possible
failure reasons: Problems with the query, “ResultSet” property not set
correctly, parameters not set correctly, or connection not established
correctly.

Read more here: Source link