dnlnln / generate-sql-merge

Generate SQL MERGE statements with Table data
MIT License
337 stars 151 forks source link

instruction(x)' contains an invalid XML identifier as required by FOR XML #96

Closed spottedmahn closed 1 year ago

spottedmahn commented 1 year ago

the 8/7/23 file is erroring ❌ on install for me:

Using Master database Checking for the existence of this procedure Procedure already exists. So, dropping it Msg 6850, Level 16, State 1, Procedure sp_generate_merge, Line 964 [Batch Start Line 14] Column name 'processing - instruction(x)' contains an invalid XML identifier as required by FOR XML; ' '(0x0020) is the first character at fault. Created the procedure sp_MS_marksystemobject: Invalid object name 'sp_generate_merge' Granting EXECUTE permission on sp_generate_merge to all users Msg 15151, Level 16, State 1, Line 1005 Cannot find the object 'sp_generate_merge', because it does not exist or you do not have permission. Done Completion time: 2023-08-13T18:46:04.3948666-04:00


I was able to successfully install this version from 7/31/23 ✅.

reference: history for master.dbo.sp_generate_merge.sql

thanks for sharing/creating/maintaining a great tool! 🤝

dnlnln commented 1 year ago

That's very peculiar, especially since it's showing processing - instruction(x) in your error, whereas the actual identifier is processing-instruction(x). I wonder if there's a file encoding issue. Which version of SQL are you using there?

spottedmahn commented 1 year ago

Which version of SQL are you using there?

Microsoft SQL Server 2022 (RTM-CU6) (KB5027505) - 16.0.4055.4 (X64)
Jun 29 2023 15:43:13
Copyright (C) 2022 Microsoft Corporation
Developer Edition (64-bit) on Linux (Ubuntu 20.04.6 LTS) <X64>
dnlnln commented 1 year ago

I just tried installing on 16.0.4065.3 (X64) without issue, via VSCode and SSMS.

There's been a few more changes in the last week. Mind pulling master and seeing if the problem is still happening?

dnlnln commented 1 year ago

Closing for now however please add a comment if the problem happens again