Introduction

MySQL-to-MSSQL is a program to convert MySQL databases into MS SQL format.

Features

  • All MySQL data types and attributes are supported
  • All versions of MS SQL are supported (including Azure SQL)
  • Works with all versions of Unix and Windows MySQL servers
  • Converts individual tables (see Select Tables article for related information)
  • Option to export MySQL database into local T-SQL script file (see Customize Conversion article for related information)
  • Filter data to convert via SELECT-queries (see Using Queries article for related information)
  • Converts indexes with all necessary attributes
  • Converts foreign keys
  • Converts MySQL views into MS SQL format
  • Supports multibyte character sets
  • Command line support (see Command Line article for related information)
  • Merges MySQL data into an existing MS SQL database
  • Stores configuration into profile (see Profile article for related information)
  • Easy-to-use wizard-style interface
  • Full install/uninstall support

Requirements

  • At least 64 MB of available memory
  • MS SQL environment (server or client components of MS SQL should be installed on the same machine where you run MySQL-to-MSSQL from)
  • Necessary privileges to read the source database on MySQL server

Limitations

  • Does not convert stored procedures


Add Query

This dialog allows you to compose a SELECT-query and result of this query will be migrated to MS SQL server as if it would be a regular table. Select name of table where you wish to store query results in the desintation MS SQL database. Enter query in the corresponding field. Also, you can test query on source database by pushing "Test Query" button. If query is not correct please check that it is a correct SQL SELECT-statement and all table and field names are spelled properly. You can always check query by running it from MySQL client.

See Using Queries article for the further information.


Command Line

To perform batch conversion or call conversion procedure from an automation script you can use console version of MySQL-to-MSSQL called S2MAGENT.EXE. Find this file in MySQL-to-MSSQL installation folder. You can either run this tool directly from command line or call it from any script as well. The program supports the following command-line options:

--as_dbo | connect to MS SQL server as database owner
--blob2text | convert BLOB to text
--dest=... | MS SQL database name
--help | display help message and exit
--logfile=... | path to the logfile where execution traces will be written
--mode=... | how to process an existing MS SQL database (0 - overwrite the entire database, 1 - overwrite existing tables only, 2 - skip existing tables, 3 - merge, 4 - synchronize)
--mssqlh=... | MS SQL server IP address or network name
--mssqlu=... | MS SQL user name
--mssqlp=... | MS SQL user password
--mysqlh=... | MySQL server IP address or network name
--mysqlu=... | MySQL user name
--mysqlp=... | MySQL user password
--port=... | MySQL port
--script | export MySQL data into T-SQL script file
--silent | use this option to disable program output
--skip_idx | skip converting indexes
--src=... | MySQL database name
--tab_def | convert table definitions only
--tab_file=... | name of the file containing table names to convert (one table name per line)
--views | convert MySQL views into MS SQL

In the following example the program converts MySQL database "db1" on the remote MySQL server "mysqlhost" to local MS SQL database "db1_from_mysql" using table names file "c:\tabfile1.txt":

S2MAGENT.EXE --src=db1 --dest=db1_from_mysql --mysqlh=mysqlhost --mysqlu=administrator
--mysqlp=the_passsword --tab_file=c:\tabfile1.txt

Table names file should be formatted as follows:

Table_1
Table_2
...
Table_N

Notes:

  1. You can omit 'mssqlh' or 'mysqlh' to connect local database server
  2. You can omit 'mssqlu' and 'mssqlp' parameters to connect to MS SQL server using Windows authentication
  3. It is necessary to specify 'port' parameter only if it differs from the default MySQL port 3306
  4. If you omit 'tab_file' parameter, all database tables will be converted
  5. If you omit 'mode' parameter, default mode 'overwrite the entire database' will be used
  6. Command line parameters that contain spaces should be enclosed in quotes (for example --dest="my database")


Connect to MS SQL Server

On this wizard screen you should enter the necessary settings to establish connection with Microsoft SQL Server. In "MS SQL Server" field you should specify the name of an instance of MS SQL Server to which you want to connect. If you leave it empty, the local server is assumed. Also, you can specify custom MS SQL port (other than 1433) in "MS SQL Server" field as follows:

Sql_server_name,1234

where 1234 is the custom port. Then you should specify the type of authentication to use when connecting to MS SQL Server:

Then you should specify the type of authentication to use when connecting to MS SQL Server:

  • Windows authentication - SQL Server will validate the connection using the Windows NT user information. This option is only available when connecting to an instance of MS SQL Server on Windows NT. The client should be member of a Windows NT/2000 domain or workgroup. The user needs to be validated as a Windows NT user before access is granted.
  • SQL Server authentication - SQL Server will use the standard security validation. To log in you should specify user name and password recognized on the target MS SQL Server.

When connecting via 'SQL Server authentication' and specifying MS SQL user from 'administrator' group (but not 'dbo'), MS SQL opens each table as [dbo].[table name]. Be default, MySQL-to-MSSQL tries to open each table as [<user name>].[<table name>] and it may cause errors. You can resolve this problem by selecting "Connect as database owner" checkbox. Please note that the specified user must have enough privileges to write into the destination MS SQL database. Otherwise, the option will not take effect.

If you are connecting to Azure SQL, see How to connect to Windows Azure SQL article for related information.


Connect to MySQL Server

On this wizard screen you should enter the necessary settings to establish connection with MySQL server. MySQL-to-MSSQL is able to connect to MySQL server using local or remote mode. Local mode is being used to connect MySQL server launched on the same machine where you run MySQL-to-MSSQL from. Remote mode allows you to connect to MySQL server launched on another computer.

By default the program uses local connection mode. It is indicated by radio button "Local" selected. To establish remote connection you should select "Remote" radio button. For remote MySQL servers you should also enter host and TCP/IP port to connect through. Host could be either network name or IP address. TCP/IP port value is necessary only if it differs from the default MySQL port number 3306. Otherwise you may leave this field as is.

Finally, you are entering user name and password. You can leave these fields empty for anonymous connection.

NOTE: MySQL 4.1.0 uses the authentication protocol based on a password hashing algorithm that is incompatible with that used by MySQL-to-MSSQL. See Troubleshooting article to learn how to resolve this problem.


Customize Conversion

MySQL-to-MSSQL provides two options to convert MySQL database into Microsoft SQL data source:

  • Migrate to MS SQL server directly - use this approach to migrate data from the source database to MS SQL server directly. To use this option you need direct access to MS SQL server and necessary privileges to create a database on the target server. See Connect to MS SQL Server article for related information.
  • Export into local T-SQL script file - use this approach to get more control over the process. Following this way, MySQL-to-MSSQL exports the contents of the source database into a local script file (.sql) instead of moving it to MS SQL server directly. The resulting file contains T-SQL statements to create all tables and to fill them with the data. See Importing T-SQL script file article for related information.

You can choose one of these approaches on the first page of MySQL-to-MSSQL wizard using the corresponding radio buttons.


Edit Table

On this wizard screen users can edit table name and customize types mapping.

MySQL-to-MSSQL converts MySQL types into the most appropriate Microsoft SQL types. However, sometime it is necessary to change type for one or multiple columns. To customize type mapping select the appropriate item in the listview on the left and specify new name, type and default value for the field using "Field info" group of controls. Please note that listview on the left contains column attributes for the original MySQL database, new custom types and attributes will be displayed in "Field info" controls when the corresponding item is highlighted in the listview.

See Types Mapping article to learn more about safe mapping MySQL types into Microsoft SQL types.


How to connect to SQL Azure

This article described how to connect to Windows SQL Azure from MySQL-to-MSSQL. First, you should make sure that your IP address in the list of allowed IPs:

1. open the Dashboard and click on the server you want to configure

2. click on "Show firewall settings" link

3. click on "Add client IP" link and make sure that the control "Allow access to Azure services" is ON

Now it's time to get the name of Azure Server:

  • go back to Dashboard and click on database name you want to use (it is "test0425" on the 1st screenshot above)
  • you will see window like on the screenshot below
  • locate "Server name" item and name of the Azure Server follows right after it ("ic0425.database.windows.net" for our example)

Finally, run MySQL-to-MSSQL. On "Connect to MS SQL server" page you need to select "SQL Server authentication" option, enter the name of Azure SQL Server, username and password (from registration of Azure SQL service on windowsazure.com website) into the appropriate fields.


Importing T-SQL script file

This article explains how to export T-SQL script file to Microsoft SQL server using the most popular tools.

1. MS SQL console client (sqlcmd.exe)

Syntax of the command line depends on the structure of the dump file. If the dump file contains 'CREATE DATABASE' statement you should call the tool as follows:

sqlcmd.exe -S {MS SQL server} -U {user name} -P {password} -i {T-SQL script file name}

Otherwise:

sqlcmd.exe -S {MS SQL server} -U {user name} -P {password} -d {database name} -i {T-SQL script file name}

Of course you need to replace parameters in figure brackets {...} by actual values. You can omit 'user name' and 'password' parameters to connect to Microsoft SQL server using Windows authentication.

2. SQL Server Management Studio

To import T-SQL script file into Microsoft SQL server using this tool, take the followin gsteps:

  1. connect to the destination SQL server
  2. select 'Open' menu item and specify T-SQL script file
  3. click 'Execute' toolbar button

Note, that if your T-SQL script file is large (100+ MB), it is better to import it using sqlcmd.exe because SSMS may crash on it.


FAQ

On this page you can find the most frequently asked questions regarding MySQL-to-MSSQL. If your question is not answered here, please contact us at service@convert-in.com

  • What versions of MS SQL are supported?
  • Does MySQL-to-MSSQL require MS SQL server installation?
  • How to specify custom MS SQL port (other than 1433)?
  • Does MySQL-to-MSSQL support batch conversion?
  • How to change destination table name?
  • How can MySQL-to-MSSQL connect to Azure SQL?
  • How to uninstall MySQL-to-MSSQL?

What versions of MS SQL are supported?
MySQL-to-MSSQL works with all versions of MS SQL including Azure SQL.
Go to Top

Does MySQL-to-MSSQL require MS SQL server installation?
MySQL-to-MSSQL requires MS SQL environment (server or client components of MS SQL must be installed on the same machine where you run MySQL-to-MSSQL from).
Go to Top

How to specify custom MS SQL port (other than 1433)?
You can specify custom port on 'Step 2 of 6' wizard page in 'MS SQL Server' field as follows:

Sql_server_name,1234

where 1234 is the custom port.
Go to Top

Does MySQL-to-MSSQL support batch conversion?
Yes, MySQL-to-MSSQL supports command line arguments and so it can handle batch conversion. See Command Line article for related information.
Go to Top

How to change destination table name?
You can convert contents of the table as result of SELECT-query with custom name. Click "Add Query" button on "Select tables" wizard page and compose simple query as follows:

SELECT * FROM <original table name>
Then store it with the name you wish to assign. Of course, you need to place actual MySQL table name in the query above.
Go to top

How can MySQL-to-MSSQL connect to Azure SQL?
See How to connect to Windows Azure SQL article for related information.
Go to top

How to uninstall MySQL-to-MSSQL?
If you need to remove MySQL-to-MSSQL products from your computer, you can use "Add or Remove Programs" option in the Windows Control Panel. If this option is not available for some reason, you can call uninstall procedure running the following command line from the installation folder:

UNWISE.EXE sql2mss.log
Go to top


Merging and Overwriting

If you try to convert MySQL database into an existing MS SQL database, MySQL-to-MSSQL allows you to choose one of the following options: overwrite the entire database, overwrite existing tables only, merge into the database or specify another destination name.

  • Select 'Overwrite the entire database' option to replace the entire contents of the destination MS SQL database with MySQL data. Note that all data contained in MS SQL database will be lost.
  • Select 'Overwrite existing tables only' option to replace the contents of MS SQL tables having the same names as tables in source MySQL database.
  • Select 'Skip existing tables only' option to not convert existing tables.
  • Select 'Merge' option to merge MySQL data into the destination MS SQL database. MySQL-to-MSSQL implements quite simple merging algorithm. If a table has primary key or an unique index, the program inserts into MS SQL database only those records whose key/index value does not exist in the destination MS SQL table. Otherwise, MySQL-to-MSSQL appends the whole table contents to the corresponding MS SQL table. Note: the structures of source and destination tables must be identical.
  • Select 'Synchronize' option to update existing MS SQL tables with MySQL data. See Synchronization article for the further information.

If you decide to enter another destination name just click 'Cancel' button.


MS SQL script file settings

On this wizard screen you can specify how the resulting dump file should be constructed. There are following settings available:

  • Insert 'CREATE DATABASE' statement - select this option to put 'CREATE DATABASE' statement in the resulting dump file. This setting doesn't take effect without the option below activated.
  • Insert 'CREATE TABLE' statements - select this option to put 'CREATE TABLE' statements in the resulting dump file. You should always select it in order to obtain a valid dump file. The only exception is appending the data to existing tables.
  • Insert comments - select this option to add brief comments. It makes the resulting dump file more readable.
  • Support Unicode - select this option to support Unicode. In this mode MySQL-to-MSSQL converts all strings as NCHAR or NVARCHAR.

See Importing T-SQL script file article to learn how to import contents of T-SQL script file (.sql) to Microsoft SQL server.


Profile

Profile is a set of parameters that entirely defines the program session. It includes MS SQL and MySQL connection information (host, user name, etc) and all necessary settings. If you have created a profile, you can load it by pushing "Load Settings" button on the first wizard screen.

Once you enter all the information for converting databases, you can store it into a profile and reuse in next sessions. If you don't use any profile initially or change some parameters while working with the Database Conversion Wizard, you can store the updated information on exit by pushing "Save Settings" button on the last wizard screen.

NOTE: do not modify a profile manually since it may cause incorrect interpretation of conversion settings.


Quick Launch

Once you stored conversion settings into profile you can run the program in Quick Launch mode. Just launch Windows Explorer and double-click on the profile description (.s2m) file with left mouse button. This will cause MySQL-to-MSSQL wizard to launch conversion loading the necessary settings from the specified profile. Then you will be taken right to the screen with progress of conversion without entering all conversion settings.

See Profile article for more information about profiles.


Select Databases

On this wizard screen you should enter source and destination database names. Is is possible to enter MySQL database name directly or drop down the combo box to see all available databases. Note, that you should have sufficient privileges to browse list of available databases. If you specify the name of existing MS SQL database it will be overwritten.

Also, you can customize the conversion process using the following settings:

  • Convert BLOB to text - sometime MySQL database authors define text columns as BLOB (for example, in order to perform case-sensitive comparison). In this case you should select the checkbox to obtain better conversion results.
  • Convert table definitions only - select this checkbox to convert only table definitions of MySQL database. All the data will not be migrated.
  • Convert views - select this checkbox to convert views
  • Skip converting indexes - select this checkbox if you don't want to convert indexes


Select Tables

On this wizard screen you can manage the list of MySQL tables to convert. In the left part of the screen you can see "Available tables" list box. It contains all available tables of the source database except those that you have selected already. On the right you can see "Selected tables" list box. To add new MySQL table for converting into MS SQL format you should select it in "Available tables" list box and click "Add" button (or double-click the selected item). Also you can use "Add all" button to insert all available MySQL tables. To remove an item from "Selected tables" list you should select it and click "Remove" button. You can use "Remove all" button to remove all items from "Selected tables" list box.

Push "Add Query" button to add SELECT-query filtering data that will be migrated to MS SQL server. See Using Queries article for the further information.

To edit selected table or query double click the corresponding item in "Selected tables" list box. If it is a table, dialog box appears to edit table attributes and to define custom type mapping. See Edit Table article for the further information. If selected item is a query, you will see dialog box to edit SQL-statement of the query.


Select Views

On this wizard screen you can manage the list of MySQL views to convert into MS SQL. In the left part of the screen you can see "Available views" list box. It contains all available views of the source database except those that you have selected already. On the right you can see "Selected queries" list box. To add new MySQL view for converting into MS SQL you should select it in "Available queries" list box and click "Add" button (or double-click the selected item). Also you can use "Add all" button to add all available MS SQL views. To remove an item from "Selected views" list you should select it and click "Remove" button. You can use "Remove all" button to remove all items from "Selected views" list box.

Some views may depend on another views that must be created first. Use the up and down buttons to control the order in which views are converted. Highlight an item in "Selected views" list and then you will be able to move it up and down using those buttons.


Synchronization

MySQL-to-MSSQL implements synchronization as combination of insert MySQL records that are missing in MS SQL table and update existing MS SQL records with MySQL data. For synchronization purpose source and destination tables must have identical structures and have primary key or unique index defined.

Assume both MS SQL and MySQL databases have table "People" defined as below:

    Table1(
        ID Integer NOT NULL,
        FName Varchar(50),
        LName Varchar(50),
        EMail Varchar(50),
        Primary Key (ID)
    );

This table has the following contents in MySQL database:

2 | Andrew | White | a.white@corporation.com
3 | Phil | Johnson | p.johnson@gmail.com

In MS SQL database:

1 | John | Smith | j.smith@msn.com
2 | Andew | White | a.white@yahoo.com
After migrating MySQL data to MS SQL in "Synchronize" mode MySQL table is kept untouched and MS SQL table is modified as (pay attention to the cell marked red):
1 | John | Smith | j.smith@msn.com
2 | Andew | White | a.white@corporation.com
3 | Phil | Johnson | p.johnson@gmail.com


Troubleshooting

While working with MySQL-to-MSSQL wizard you may encounter unexpected behavior or result. Use the following information to solve some common problems and get the result you want. This summary is organized as a list of problem-resolution pairs. Each problem description starts with "P:" and each resolution - with "R:".

P: Error message "The program does not support authentication protocol requested by server..."
R: MySQL 4.1.0 uses the authentication protocol based on a password hashing algorithm that is incompatible with that used by MySQL-to-MSSQL. You can use OLD_PASSWORD function to make the certain account compatible with MySQL-to-MSSQL. Login to MySQL server with administrator privileges and run the following queries:

    mysql> USE mysql;
    mysql> UPDATE user SET Password = OLD_PASSWORD('mypass')
        -> WHERE Host = 'some_host' AND User = 'some_user';
    mysql> FLUSH PRIVILEGES;

Of course, you should place actual values instead of 'some_pass', 'some_host' and 'some_user'. Now you can use 'some_user' account with MySQL-to-MSSQL.

P: Error message "There are orphaned records that prevent from creating foreign key..."
R: Foreign key cannot be created because there are one or more child records that do not have a matching record in the parent table. You have to remove these records in order to create the foreign key. The following query will determine if the entries in the child table have invalid foreign key references:

     select <fk_column> from <child_table>
     where not exists
         (select <fk_column> from <parent_table> where
         <child_table>.<fk_column> = <parent_table>.<fk_column>)

where <child_table> - table with the foreigh key, <parent_table> - table with primary key referenced by the foreign key, <fk_column> - column included in foreign key.

P: Error message "The statement has been terminated".
R: This generic error is most probably caused by either of two reasons: conflict in primary key/unique index or insufficient database storage. To check 1st hypothesis, select "Skip converting indexes" checkbox on "Step 3 of 5" wizard page. If the problem is gone away, pay attention to the data that is part of primary key/unique index. If you're not sure about how to proceed, please contact us at service@convert-in.com.

Otherwise, expand the database storage as follows. In SQL Server Management Studio:

  • In Object Explorer, connect to an instance of the SQL Server Database Engine, and then expand that instance.
  • Expand Databases, right-click the database to increase, and then click Properties.
  • In Database Properties, select the Files page.
  • To increase the size of an existing file, increase the value in the Initial Size (MB) column for the file. You must increase the size of the database by at least 1 megabyte.
  • To increase the size of the database by adding a new file, click 'Add' and then enter the values for the new file. For more information, see 'Add Data' or 'Log Files' to a Database.
  • Click OK.

In T-SQL use the following statement:

ALTER DATABASE <database name>
MODIFY FILE
    (NAME = <storage file>,
    SIZE = <new size>MB);
GO

Please contact us at service@convert-in.com if the error persists.

P: Error message "Can't connect to MySQL server on <host name or IP>".
R: Make sure MySQL server is launched on the target machine. Also please check the port number field to verify that you have specified the correct number.

P: Error message "The specified record violates the integrity constraints..."
R: This error means that an attempt has been made to insert a record with a duplicate unique key. When migrating MySQL data into a new MS SQL database, you can either edit source database in order to resolve the conflict manually or restart the program with "Skip converting indexes" checkbox selected. When appending MySQL data to an existing MS SQL database, you should remove the conflicting unique index in the destination MS SQL database.

NOTE: unlike MySQL, all MS SQL indexes are case insensitive. For example, two different MySQL keys "string" and "String" will be considered as identical keys in MS SQL.

P: Error message "Access denied for user: <user-name>"
R: You will not be able to connect to MySQL server until you have the appropriate permissions. Ask your MySQL server administrator give you 'SELECT' privilege on the source MySQL database.

P: There are no databases in 'MySQL database name' listbox.
R: The user has not enough privileges to extract databases list. Ask your MySQL server administrator give you 'SHOW DATABASES' privilege.

P: Error message "The specified table already exists"
R: When you specify MS SQL user from 'administrator' group (but not 'dbo'), MS SQL opens each table as [dbo].[table name]. By default MySQL-to-MSSQL opens all tables as [<user name>].[<table name>]. To resolve the problem select 'Connect as database owner' checkbox on 'Connect to MS SQL server' wizard page. Please note that the specified user must have enough privileges to write into the destination MS SQL database. Otherwise, the option will not take effect.

P: Program freezes on the second dialog while connecting to remote MySQL server.
R: MySQL server cannot resolve network names. Close the program, restart MySQL daemon with "--skip-name-resolve" option and try again.

P: I cannot uninstall MySQL-to-MSSQL.
R: If you need to remove MySQL-to-MSSQL product from your computer, you can use "Add or Remove Programs" option in the Windows Control Panel.

If you came across some other kind of problem while using MySQL-to-MSSQL, please contact our support department at service@convert-in.com


Types Mapping

Microsoft SQL and MySQL have similar set of data types. Some of them are compatible with each other, while the rest are not. When designing the schema of custom (non-standard) types mapping, it is necessary to remember the following compatibility matrix for popular data types of Microsoft SQL and MySQL. In tables below all valid type mappings are marked green (with restriction on data if any), every prohibited or dangerous type mapping is marked orange.

Text / Binary

 | CHAR | VARCHAR | BINARY | VARBINARY | TINYTEXT | MEDIUMTEXT | TEXT | LONGTEXT | TINYBLOB | MEDIUMBLOB | BLOB | LONGBLOB
CHAR | dest. length >= source length | dest. length >= source length |  |  |  | Possible truncation of text | Possible truncation of text | Possible truncation of text |  |  |  |
VARCHAR | dest. length >= source length | dest. length >= source length |  |  |  | Possible truncation of text | Possible truncation of text | Possible truncation of text |  |  |  |
TEXT |  |  |  |  |  |  |  |  |  |  |  |
NCHAR | dest. length >= source length | dest. length >= source length |  |  |  | Possible truncation of text | Possible truncation of text | Possible truncation of text |  |  |  |
NVARCHAR | dest. length >= source length | dest. length >= source length |  |  |  | Possible truncation of text | Possible truncation of text | Possible truncation of text |  |  |  |
NTEXT |  |  |  |  |  |  |  |  |  |  |  |
BINARY |  |  | dest. length >= source length | dest. length >= source length |  |  |  |  |  | Possible truncation of data | Possible truncation of data | Possible truncation of data
VARBINARY |  |  | dest. length >= source length | dest. length >= source length |  |  |  |  |  | Possible truncation of data | Possible truncation of data | Possible truncation of data
IMAGE |  |  |  |  |  |  |  |  |  |  |  |

Numeric

 | BOOLEAN | TINYINT | SMALLINT | MEDIUMINT | INT | BIGINT | DECIMAL / NUMERIC | FLOAT | DOUBLE | REAL
BIT |  |  |  |  |  |  |  |  |  |
TINYINT |  |  | Possible truncation of data | Possible truncation of data | Possible truncation of data |  |  |  |  |
SMALLINT |  |  |  | Possible truncation of data | Possible truncation of data |  |  |  |  |
INTEGER |  |  |  |  |  | Possible truncation of data |  |  |  |
BIGINT |  |  |  |  |  |  |  |  |  |
DECIMAL |  |  |  |  |  |  | Precision and scale should be the same | Possible truncation of data | Possible truncation of data | Possible truncation of data
FLOAT |  |  |  |  |  |  | Possible loss of precision |  | Possible truncation of data | Possible truncation of data
REAL |  |  |  |  |  |  | Possible loss of precision |  |  |

Date / time

 | DATE | DATETIME | TIME | TIMESTAMP | YEAR
DATE |  | Possible truncation of data |  | Possible truncation of data |
TIME |  |  |  |  |
DATETIME |  |  |  |  |
SMALLINT |  |  |  |  |


Using Queries

Queries give you the ability to extract partial data for migrating to MS SQL server. The following examples are provided to illustrate how to use queries for particular purposes. Assume that we have table "Table1" as below:

   Table1(
    ID INT NOT NULL AUTO_INCREMENT,
    FName VARCHAR(50),
    LName VARCHAR(50),
    Birthday DATE,
    Notes TEXT
   );

Example 1. Convert certain records.

    SELECT * FROM Table1 WHERE ID > 1000
Example 2. Choose and rename columns.

    SELECT FName as FirstName, LName as LastName FROM Table1

Example 3. Skip records containing NULL values.

    SELECT * FROM Table1 WHERE Notes IS NOT NULL

You can add queries on "Select Tables" wizard screen. See Select Tables article for related information.


Contents

Add Query

Command Line

Connect to MS SQL Server

Connect to MySQL Server

Customize Conversion

Edit Table

FAQ

How to connect to SQL Azure

Importing T-SQL script file

Introduction

Merging and Overwriting

MS SQL Script File Settings

Profile

Quick Launch

Select Databases

Select Tables

Select Views

Synchronization

Troubleshooting

Types Mapping

Using Queries