Tuesday 30 April 2013

SQL Server : Export data from the table to a flat file by using the SQL Server Import and Export Wizard



You want to export data from the table to a flat file by using the SQL Server Import and Export Wizard.
You need to ensure that the following requirements are met:

1. The first row of the file contains the first row of data.
2. Each record is of the same length.
3. The date follows the U.S. date format.
4. The file supports international characters.

What should you do?

Answer:















Explanation


1. The first row of the file contains the first row of data.

Column names in first data row
Indicate whether you want to display column names in the first data row so check-box need not to be selected.

2. Each record is of the same length.

Format

Indicate whether to use delimited, fixed width, or ragged right formatting.

Value
Description
Delimited
Columns are separated by a delimiter, specified on the Columns page.
Fixed width
Columns have a fixed width.
Ragged right
Ragged right files are files in which every column has a fixed width, except for the last column, which is delimited by the row delimiter.

So, Fixed width option need to be selected.

3. The date follows the U.S. date format.

Locale
Specify the locale ID (LCID) that defines character sort orders and date and time formatting so English (United States)

4. The file supports international characters.

Unicode
Indicate whether to use Unicode. If you use Unicode, you do not have to specify a code page.
A Unicode character takes more bytes to store the data in the database. As we all know, many global industries wants to increase their business worldwide and grow at the same time, they would want to widen their business by providing services to the customers worldwide by supporting different languages like Chinese, Japanese, Korean and Arabic. Many websites these days are supporting international languages to do their business and to attract more and more customers and that makes life easier for both the parties.

To store the customer data into the database the database must support a mechanism to store the international characters so for
 international characters support Unicode checkbox should be selected.

Hope this will help.


Brgds,

Chhavinath Mishra

Database Administrator
Microsoft Certified IT Professional (MCITP)




No comments:

Post a Comment