Search

Can't export to CSV from SQL Server 2012 Import/Export Wizard by SQLNoobie

Active

7
0
Sign in
to vote
Type: Bug
ID: 773832
Opened: 12/7/2012 3:04:58 PM
Access Restriction: Public
1
Workaround(s)
3
User(s) can reproduce this bug
Please see "Details" section below for more info about the exact steps I am taking to come produce this error. I am unable to do a simple export to CSV using SQL Server 2012 (I am able to from SQL Server 2008 however). This is the error message I get when trying to export from a database to a CSV file, using the Import/Export Wizard:


TITLE: SQL Server Import and Export Wizard
------------------------------

Column information for the source and the destination data could not be retrieved, or the data types of source columns were not mapped correctly to those available on the destination provider.


[Query] -> C:\Users\NEW\Desktop\TEST.csv:

         - Column "last_name": Source data type "200" was not found in the data type mapping file.
         - Column "first_name": Source data type "200" was not found in the data type mapping file.
         - Column "middle_name": Source data type "200" was not found in the data type mapping file.
         - Column "suffix": Source data type "200" was not found in the data type mapping file.
         - Column "title": Source data type "200" was not found in the data type mapping file.

------------------------------
BUTTONS:

OK
------------------------------
Details (expand)

Product Language

English

Version

SQL Server 2012 - Express Edition

Category

Tools (SSMS, Agent, Profiler, Migration, etc.)

Operating System

Windows 7 Home Premium (SP1)

Operating System Language

English

Steps to Reproduce

In SSMS 2012:
Right-click database, choose Tasks > Export Data...
In the SQL Import and Export Wizard:
Choose next on welcome page
Leave default source info, click next
For destination, choose Flat File Destination
Browse and enter a file location/name, choose CSV for extension
Leave other defaults (English United States, 1252 ANSI - Latin I, Delimited, <none>, column names in first data row) click next
Write query to pull all records desired, parse to verify query is valid
Query used:
***
SELECT * FROM table
WHERE column = 1;
***
Choose desired delimiter (pipe for me)
Preview works, see the data I want
When click next, get error message (see description) and can't continue

Actual Results

Unable to export to CSV from SQL Server 2012 Express, Import and Export Wizard, get stuck with error message (see description).

I am able to export to CSV from SQL Server 2008, Import and Export Wizard, on the same computer from the same database with the same settings.

Expected Results

I expect to be able to export to CSV from SQL Server 2012, just as I am from SQL Server 2008

Platform

X64

Virtualization

 
File Attachments
0 attachments
Sign in to post a comment.
Sign in to post a workaround.
Posted by Corey G DW on 4/30/2013 at 1:10 PM
The following consistently works for me.

Click the Edit Mappings button then in the Destination column click on each row effectively setting the focus in each Destination item. Then click the Ok button.