Category: "Scripts"

Scripting Table Data with SQL Server 2008 R2

I recently was asked, whether the Feature “Script Data” as T-SQL-command INSERT INTO… has been removed in SQL Server 208 R2.

In fact, it was not visible on first sight.

This is how you can find it:

It is still the right-click “Tasks” - “Generate Scripts” –Wizard.

After having chosen the Table(s), the following window appears:

SQL_2008R2_Set_Scripting_Options

there click “Advanced” and scroll down inside the “General”-part until the Element “Types of data” to script

DB_Advanced_Scripting_Options

And there under the following drop-down, it is hidden:

Types_of_data_to_script_drop_down

And the German translation “Datentypen, für die ein Skript erstellt wird”, makes it even harder to detect:

Erweitere_Skriptoptionen

Conclusion: Scripting out Data with “INSERT INTO”-commands is a bit hidden – (under SQL 2008 it was under the “Table/View Options”, now under “General” – “Types of data to script”) but still available :-)

 

www.andreas-wolter.com

1 2