all groups > sql server data warehouse > november 2007 >
You're in the

sql server data warehouse

group:

How to use the bcp command prompt utility to import data into a ta


How to use the bcp command prompt utility to import data into a ta Ali Shirazi
11/3/2007 1:57:19 AM
sql server data warehouse:
How to use the bcp command prompt utility to import data into the "Test"
table

Click Start->Run->cmd.

In the command window , type cd c:\ which will take you to the root of c:\.

At the C:\ prompt, type bcp Testdb..Test in Test.txt -c -T, and then press
Enter.

The bcp command identifies the database (Testdb) and table (Test) that will
receive the imported data from the data souce. The data source ist
(Test.txt) a test file. The 'in' keyword is used when importing data into a
table. The -c switch specifies that a character (char) data type should be
used, and the -T switch specifies that a trusted connection should be used.

On execution of this command, the bcp utility copies the data from the
Test.txt file into the Test table. Once the data has been copied, a message
appears and the statistics which for the number of rows copied, the network
packet size, and the clock time are displayed.


--
AddThis Social Bookmark Button