BlitzSqlExtract2SeedData 1.1.2

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package BlitzSqlExtract2SeedData --version 1.1.2
NuGet\Install-Package BlitzSqlExtract2SeedData -Version 1.1.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlitzSqlExtract2SeedData" Version="1.1.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BlitzSqlExtract2SeedData --version 1.1.2
#r "nuget: BlitzSqlExtract2SeedData, 1.1.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install BlitzSqlExtract2SeedData as a Cake Addin
#addin nuget:?package=BlitzSqlExtract2SeedData&version=1.1.2

// Install BlitzSqlExtract2SeedData as a Cake Tool
#tool nuget:?package=BlitzSqlExtract2SeedData&version=1.1.2

SqlExtract2SeedData

An update to a little utility to extract tables in SQL Server to SQL Files for Seed Data

.NET Core 3.1 Runtime or SDK Required

Usage

BlitzSqlExtract2SeedData 1.1.2 Copyright (c) 2020 Blitzkrieg Software

-v, --verbose Set output to verbose messages.

-c, --connectstring Required. Connection String

-t, --table Required. SQL Table To Extract Data From

-o, --orderby (optional) Order By Clause in the form of "order by column1, column2"

-w, --where (optional) Where Clausein the form of "where (column1 = 3)"

-n, --ntop (optional) Top N Rows

-a, --ascsv (optional) Emit CSV instead

--help Display this help screen.

--version Display version information.

Pro Tip: please use quotes around strings like table names, clauses, etc.

Sample Command

BlitzSqlExtract2SeedData -c "Server=.\sqlexpress;Database=Bicycle;Trusted_Connection=True;" -t "store.product"

Table notation

Tables can be in the form of:

  • table[dbo].[table]

  • [table][dbo].[table]

  • schema.table[schema].[table]

  • [schema].[table][schema].[table]

  • "table"[dbo].[table]

  • "[table]"[dbo].[table]

  • "schema.table"[schema].[table]

  • "[schema].[table]"[schema].[table]

Where and Order By

You can use where and/or order by clauses, just like you would do in SQL server.

Please supply full valid sql clauses such as:

BlitzSqlExtract2SeedData -c "Server=.\sqlexpress;Database=Bicycle;Trusted_Connection=True;" -t "store.product" -w "Where [IsActive] = 1" -o "Order By [CustomerId]"

Top Modifier

By default, all rows are returned. If -n is specified a Top N clause is added, the rows returned are controlled by the where and order by clauses if supplied, and will be returned in "natural" order otherwise.

BlitzSqlExtract2SeedData -c "Server=.\sqlexpress;Database=Bicycle;Trusted_Connection=True;" -t "store.product" -n 20

or

BlitzSqlExtract2SeedData -c "Server=.\sqlexpress;Database=Bicycle;Trusted_Connection=True;" -t "store.product" -w "Where [IsActive] = 1" -o "Order By [CustomerId]" -n 100

As CSV

Using the flag -a will create a CSV file with TAB delimiters, instead of a seed data SQL Script.

To open it in Excel or Open Office, use the file, open mechanism so that you will be given a chance to set the settings in the text import wizard:

  • Field Delimiter (Tab \t)
  • Row Delimiter (CRLF \r\n)

About Me

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated

Updated for the latest versions of Microsoft SQL Server