How can we import and export using BCP utility?



How can we import and export using BCP utility?..

Answer / kishore

Import to test file:-
--------------------
bcp "SELECT ProcContent FROM <DBName>.dbo.NewProc order by
ID" queryout C:\NewProc.sql -c -S <ServerName> -T

If we can run(dos prompt) above statement in set of records
are store into c:\newproc.sql file.

Export from File:-
-----------------
BULK INSERT myTestCharData FROM 'C:\myTestCharData-c.Dat'
WITH ( DATAFILETYPE='char', FIELDTERMINATOR=',');

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More Data Warehouse General Interview Questions

What are the advantages and disadvantages of using stored procedures versus calling sql inline in cold fusion?

0 Answers  


Explain vldb?

0 Answers  


What is recovering sessions?

0 Answers  


Name a few sectors which use data warehousing?

0 Answers  


What's a Cube in Rolap?

2 Answers   Oracle,


What is a real-time data warehouse?

0 Answers  


1.WHAT IS DATA MART ?

5 Answers   HCL,


Explain why fact table is in normal form?

0 Answers  


What is metadata in context of a datawarehouse and how it is important?

0 Answers  


What is a hash cluster?

0 Answers  


Explain what are the advantages and disadvantages of reporting directly against the database?

0 Answers  


What is Operational Data Store?

0 Answers   Informatica,


Categories