Skip to content Skip to sidebar Skip to footer

Insert On Synapse Dw In Ssms

simple insert code but i keep getting syntax errors the values lines have a value for each column in the table, it only has 3 columns, i've tried removing the comma, tried using se

Solution 1:

Azure Synapse Analytics (formerly known as Azure SQL Data Warehouse) does not support the INSERT ... VALUES clause for more than a single row. Simply convert these into a SELECT with UNION ALL, eg

INSERTINTO dbo.countryCurrency 
SELECT'Afganistan', 'Afghani', 'AFN'UNIONALLSELECT'Aland Islands', 'Euro', 'EUR'UNIONALLSELECT'Albania', 'Lek', 'ALL'UNIONALLSELECT'Algeria', 'Algerian Dinar', 'DZD'UNIONALLSELECT'American Samoa', 'US Dollar', 'USD'-- ... etc

Solution 2:

The SQL Server table value constructor is not supported in Azure Synapse, see https://docs.microsoft.com/en-us/sql/t-sql/queries/table-value-constructor-transact-sql.

Post a Comment for "Insert On Synapse Dw In Ssms"