ADMIN_Csv_ParseFile

Deprecated. Don't use for new development and try to migrate existing uses.

Type: Stored procedure

Parses a comma-separated-values file in varbinary format.

The columns may be separated by any separator you specify, and values may optionally be quoted with double-quotes.

Use ADMIN_Csv_ParseText if you need to parse nvarchar data.

Parameters

@ColumnCount mandatory int
How many columns the data contains.

If less than the actual number of columns in the data then then an error will occur.

If greater than the actual number of columns in the data then performance will suffer.
@Encoding optional varchar(500)
Encoding to use to interpret the binary data in the file.

Can be the name of any encoding that .net can handle. Unfortunately which encodings are supported varies between servers. See http://msdn.microsoft.com/en-us/library/system.text.encoding.aspx

When possible request that the entity exporting the CSV data uses the utf-8 encoding, as this both preserves international characters and avoids endian problems.
Default is Windows-1252.
Possible value Description
us-ascii US-ASCII
utf-16 Unicode (Little endian)
utf-8 Unicode (UTF-8)
Windows-1252 This encoding supports Swedish characters and is the most common non-Unicode encoding used on western Windows.
@File mandatory varbinary(max)
The file to parse.
@Separator optional nchar(1)
Value that separates columns/fields. The default is semi-colon (;)