Best way to move data is exporting to CSV files, seperately for each table. While exporting, you have to:
- Custom Export
- Different and unique strings for both "Columns separated with" and "Columns enclosed with" (I used ############ and @@@@@@@, respectively)
- Check "Remove carriage return/line feed characters within columns"
- Check "Put columns names in the first row"
- Download export file
After downloading, replacing will take place:
- Tabs with spaces \t -> space
- Double quotes to single " -> '
- ###### -> \t
- @@@@@@@ -> "
Finally, encoding conversion is required. myadmin output is ANSI file and it is corrupt. Sql server might not able to handle it. To resolve it, first convert to UTF-8 and convert to ANSI again (In notepad++, it has options in "Encoding" menu).
While importing to SQL server, you must have to select text file as source. Select related csv files and while importing, take care of column lengths. Sql server will make all your columns varchar(50) default. Exported data will have much more larger columns. You have to adjust them in import wizard manually. Use DT_Text (not DT_NTEXT) for string values.
I know this process will result in some data loss (tabs and double quotes) however, it is wordpress' html editor's fault. Html data should be stored as encoded in database for these purposes...