Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can I invoke the Microsoft Bulk Copy Program from a Warehouse script ?

0
10 Posted

Can I invoke the Microsoft Bulk Copy Program from a Warehouse script ?

0
10

The Microsoft Bulk Copy Program (BCP) is a utility for copying large amounts of data into or out of SQL Server. Please consult the MSDN Library for product details. The following is an example of a very simple use of SQL Server bulk insertion. BCP is invoked by means of the Warehouse DIRECT or CALL DIRECT commands. The source is a text file that uses the BCP default field separator – the tab, not the comma. The text file is named d:\src\source and contains two fields per line and the following three lines : abcdef120 abcdfe121 abcedf122 The SQL Server table target is also defined as having two columns. The Warehouse script creates the target table in SQL Server, uses BCP’s bulk load facility to populate the target from the source, and then reads the target to count the number of rows that have been loaded. open db odbc w12a_ss7 direct db, ‘drop table target’; ignore errors direct db, ‘create table target (id char(6), val integer)’ define count : image i2 value 0 call dir

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123