Ask a Question related to Microsoft SQL / MS SQL Server, Design and Development.
-
subrat_pani #1
Not able to Export data from data file
Hi,
I exported data from a table that has column with datatype as
'nvarchar' with length 31 and has NOT NULL constraint with collation as
"database default".
All the data for this column has '' as value.
I exported this table to a .csv file using command line utility "BCP".
The query was:
C:\Program Files\Microsoft SQL Server\80\Tools\Binn>bcp "SELECT * FROM
MYSYSTEM..cfgDevices" queryout D:\mytemp.csv -t , -c -T
Export operation Succeeded. The particular column has NO VALUE in the
.csv file.
Now I changed only the first column(primary key) in the .csv file and
tried to import it back to the same table in the databse using "BCP"
The Query was:
C:\Program Files\Microsoft SQL Server\80\Tools\Binn>bcp
"MYSYSTEM..cfgdevices" in D:\mytemp.csv -t , -k -c -T
It throws the following error.
Starting copy...
SQLState = 23000, NativeError = 515
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the
value NULL into column 'TaskFileName', table 'MYSystem.dbo.cfgDevices';
column does not allow nulls. INSERT fails.
SQLState = 01000, NativeError = 3621
Warning = [Microsoft][ODBC SQL Server Driver][SQL Server]The statement
has been terminated.
BCP copy in failed
So how can I do the export operation. Please help me asap
--
Posted via [url]http://dbforums.com[/url]
subrat_pani Guest
-
Linking data, searching data, and format the data file
I'm sorta new to flash and integrating data and components...I'm usu. an interface designer. I'm trying to link a combo box to a file doesn't... -
export datagrid data to Excel file
is it possible to export excel directly from ASP.NET to Excel? My requirement is that the data on the datagrid is exported to MS Excel file after... -
export/import data to/from file
Hi How can i export/import data to/from txt file during runing my action script application?? example: i'd like to export values of my variables... -
Export Data to .CSV file
Hi, I want to export data to a .csv file in a way that a "Save Dialog" opens up and allows users to select the File Path and the File Name to... -
How do I export Oracle table data to a csv file
I am trying to export Oracle Data to csv file but it fails to export some of the data. Following is the syntax I am using: SET ECHO OFF HEADING...



Reply With Quote

