I have functions that let me create this string:
vbCrLf & "-- ### HEADER END ###" & vbCrLf & "BEGIN TRANSACTION" & vbCrLf & "SET IDENTITY_INSERT [dbo].[WidgetDescriptions_II] ON " & vbCrLf & "GO" & vbCrLf & vbCrLf & vbCrLf & "Update [dbo].[WidgetDescriptions_II] SET ShortDescription = 'DSA_A widget' , Description = '<description xmlns=""http://www.red-gate.com/widgets/WidgetDescriptionSCHEma"">" & vbCrLf & " <descriptiveText>A widget</descriptiveText>" & vbCrLf & " <manufacturer>Acme Incorporated</manufacturer>" & vbCrLf & " <countryOfOrigin>United Kingdom</countryOfOrigin>" & vbCrLf & " <size length=""12"" width=""5"" height=""7"" />" & vbCrLf & "</description>' , Picture = 0x717370565797219021 WHERE WidgetID = 1 " & vbCrLf & "GO " & vbCrLf & "If @@ERROR <> 0 SET NOEXEC ON " & vbCrLf & "GO" & vbCrLf
But how do I get this executable SQL script from it without saving it as a file?
-- ### HEADER END ###
BEGIN TRANSACTION
SET IDENTITY_INSERT [dbo].[WidgetDescriptions_II] ON
GO
Update [dbo].[WidgetDescriptions_II] SET ShortDescription = 'DSA_A widget' , Description = '<description xmlns="http://www.red-gate.com/widgets/WidgetDescriptionSCHEma">
<descriptiveText>A widget</descriptiveText>
<manufacturer>Acme Incorporated</manufacturer>
<countryOfOrigin>United Kingdom</countryOfOrigin>
<size length="12" width="5" height="7" />
</description>' , Picture = 0x717370565797219021 WHERE WidgetID = 1
GO
If @@ERROR <> 0 SET NOEXEC ON
GO
I guess that Redgate has a converter. But can not find him.
But how do I get this executable SQL script from it without saving it as a file?
I guess that Redgate has a converter. But can not find him.