Warrants en arequipa
Exercise 1: Using the Import/Export Wizard
Exercise 2: Performing a Bulk Load
Estimated time: 55 minutes
Exercise 1: Using the Import/Export Wizard
Scenery
BIdepartment from MARKETUAP enterprise require data of products in comma-delimited text files. Also, a flat file containing information from a legacy system needs to be imported into a new SQL Server database.First, you must export data from the PRODUCTO table in the MARKETUAP database to a text file, and then import that data into DWH_COMPRAS database.
Exercise Overview
In this exercise you will usethe Import and Export Wizard to import and export data from the SQL Server 2008 database.
This exercise’s main tasks are:
1. Export data using the Import and Export Wizard.
2. Import datausing the Import and Export Wizard.
Task 1: Export data by using the Wizard
1. Start SQL Server Management Studio, and log on.
2. Start the Export Data Wizard on the MARKETUAP database.
3.Choose a data source with the following properties:
- Data source: SQL Native Client 10.0 (or default version)
- Server name: local
- Authentication: Windows Authentication
-Database: MarketUAP
- Table: PRODUCTO
4. Choose a destination with the following properties:
- Destination: Flat File Destination
- File name: C:\SQL2008\Lab2\Products.txt
-Format: Delimited
- Text Qualifier:
- Column names in the first data row: Selected
5. Use the following query to select the data:
SELECT [IdProducto]
,[Nombre],[UnidadMedida]
,[StockActual]
,[StockMinimo]
FROM [MarketUAP].[dbo].[PRODUCTO]
WHERE StockActualRun>type cmd, and then click Command Prompt.
3.In the Command Prompt window, type
Task 1.1: Export using bcp in character format only.
1. In the Command Prompt window, type
BCP MarketUAP.dbo.PRODUCTO OUT C:\Export\PRODUCTO.DAT -c –T...
Regístrate para leer el documento completo.