Felix Cen
Felix Cen

Reputation: 763

Generate Script wizard scripting schema and data to ignore "GO"

I am using SSMS Generate Scripts wizard to script the schema and data for few tables in my database. Somehow the end result will add "GO" after certain insert script.

Is there any way to prevent SSMS adding "GO" from the generated script?

Thanks,

Upvotes: 5

Views: 2289

Answers (2)

spoed
spoed

Reputation: 71

Option "Delimit individual statements" is available in General scripting options (Tools -- Options -- SQL Server Object Explorer -- Scripting). SSMS Options

Upvotes: 7

Felix Cen
Felix Cen

Reputation: 763

I could not find the option but ended up using a powershell script to clean it up

(Get-Content -Path $fileName) | Where-Object { $_ -notlike 'GO' } | Set-Content -Path $fileName

Upvotes: 0

Related Questions