Database to database transfer
In a lot of the examples we have seen so far in the book, we have used files of different sorts to be the conduit for the data. Specifically, data is extracted to a file or imported from a file. However, it is perfectly possible for data to be passed directly from one system to another, which often means from one database to another. We will look at an example of this database-to-database transfer in this section. The job we will build will transfer data from our example database to a second database named DB2DB
(there is a script to create the database and an associated table in the ResourceFiles folder of this chapter). The new database contains a table named order_data containing the following fields:
order_date
order_id
line_id
order_status
product_id
product_name
brand
unit_price
quantity
extended_price
All of these fields are contained within our original database, with the exception of extended_price, which we will have to construct. (Extended price is commonly...