I use SQLCMD to import DDL generated by mssql-scripter and i got this error:
The offending INSERT is the following:
INSERT [dbo].[Settings_ContentPartFieldDefinitionRecord] ([Id], [Name], [Settings], [ContentFieldDefinitionRecord_id], [ContentPartDefinitionRecord_Id]) VALUES (12, N'JavascripttoRun', N'<settings DisplayName="Javascript to Run" InsertStuffFieldSettings.RawHtml="<script type="text/javascript"> $(document).ready(function() { ShowAdvancedLinkSettings(); }); $("#AdvancedLink_LinkType_Value").change(function() { ShowAdvancedLinkSettings(); }); function ShowAdvancedLinkSettings() { switch($("#AdvancedLink_LinkType_Value").val()) { case "External": $(".content-picker-field[data-field-name=''InternalContent'']").hide() $("#AdvancedLink_Caption_Text").parent().hide(); $("#AdvancedLink_ExternalUrl_Value").parent().parent().show(); $("#AdvancedLink_UrlBancaDati_Value").parent().parent().hide(); break; case "Internal": $("#AdvancedLink_ExternalUrl_Value").parent().parent().hide(); $(".content-picker-field[data-field-name=''InternalContent'']").show() $("#AdvancedLink_Caption_Text").parent().show(); $("#AdvancedLink_UrlBancaDati_Value").parent().parent().hide(); break; case "Banca dati": $("#AdvancedLink_ExternalUrl_Value").parent().parent().hide(); $(".content-picker-field[data-field-name=''InternalContent'']").hide() $("#AdvancedLink_Caption_Text").parent().hide(); $("#AdvancedLink_UrlBancaDati_Value").parent().parent().show(); break; default: $("#AdvancedLink_ExternalUrl_Value").parent().parent().hide(); $(".content-picker-field[data-field-name=''InternalContent'']").hide() $("#AdvancedLink_Caption_Text").parent().hide(); $("#AdvancedLink_UrlBancaDati_Value").parent().parent().hide(); break; } } </script> " InsertStuffFieldSettings.OnFooter="true" />', 7, 51)
The INSERT is correct, if i run it with SSMS or Azure Data Studio it works.
I found on internet various articles with similar error messages but no solutions that worked for me.
Any ideas?