city database
world cities home Home world cities view cart View Cart world cities my account My Account
About Us | Contact Us | Buy Online | Online Demo | Download | Developers | Affiliate Program | FAQ  
city database PRODUCTS city database
city database
GeoDataSource™ World
Cities Database
city database Free Edition
city database
city database Basic Edition
city database
city database Premium Edition
city database
city database Gold Edition
city database
city database Platinum Edition
city database
city database Titanium Edition
GeoDataSource™ World
Structural Features Database
city database Basic Edition
city database
city database Premium Edition
city database
city database Gold Edition
GeoDataSource™ World
Water Features Database
city database Basic Edition
city database
city database Premium Edition
city database
city database Gold Edition
GeoDataSource™ World
Land Features Database
city database Basic Edition
city database
city database Premium Edition
city database
city database Gold Edition
Software Products
city database GeoDataSource .NET Component
city database
city database World Major Cities 2010 + Drop Down List Source Codes
city database
city database   city database
 

How to import UTF-8 data into Microsoft SQL Server 2008


This step-by-step guide involves the use of the SQL Server Import And Export Wizard.
You should have already created the table for the data using the SQL codes provided in the product pages.
 
Select the source from which to copy data

Run the SQL Server Import And Export Wizard. Press Next until you see the Choose a Data Source page. In the Data Source dropdownlist, select Flat File Source. Then press Browse and select the data file. In the Code page dropdownlist, select 65001 (UTF-8). You must select this code page otherwise your data will be corrupted. The rest of the settings should look like the image below.

Click to view bigger image

Next, click on the Advanced section on the left side of the page. You will now see a list of columns. Now change the DataType of each column to Unicode string like in the image below:

Click to view bigger image

If the length of the column is longer than 50 characters then you will have to modify the OutputColumnWidth like in the image below:

Click to view bigger image

Choose where to copy the data to

Press Next and you will see the Choose a destination page. Here you select your SQL Server installation, key in the username / password and select the database. Press Next and you will see the Select Source Tables and Views page. Here you must modify the destination to a table name that does NOT exist yet. The import process will then create this table for you. In my example, it is called temporary_table. Do not press the Edit Mappings button. The page should now look like the image below:

Click to view bigger image

Doing the copying and cleaning up

Now just keep pressing Next until you reach the end. When the data has been successfully inserted into the temporary_table table, you should see something like the image below:

Click to view bigger image

Next, you can close the wizard and open up the SQL Server Management Studio. Connect to your SQL Server instance. Then click on New Query. Make sure you have selected the correct database. Run the code that you see in the image below (You may have to change the table names to fit whatever names you are using):

Click to view bigger image

The data will now be transferred from the temporary_table into the actual data table. Once the transfer of data has been completed, delete the temporary_table table. Now your data is ready for use.
 
cities Link to Us  cities News  cities Newsletter  cities Privacy Policy  cities Legal Disclaimer  cities Site Map