<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7621745973186676318</id><updated>2011-04-21T16:02:32.952-07:00</updated><category term='mssql'/><title type='text'>kittenheart</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kittenheart.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7621745973186676318/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://kittenheart.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>wijayadi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7621745973186676318.post-2973576230250835832</id><published>2011-01-24T19:59:00.000-08:00</published><updated>2011-01-24T20:06:19.217-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mssql'/><title type='text'>Migrate from Mysql to Ms Sql using odbc and linked server</title><content type='html'>&lt;span style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Arial;font-size:medium;"  &gt;Recently, there are needs for me to migrate data from MySQL to Ms SQL 2005.&lt;/span&gt;&lt;div&gt;&lt;span style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Arial;font-size:medium;"  &gt;The common way to accomplish this is by using DTS (&lt;i&gt;Data Transformation Service&lt;/i&gt;) feature of Ms SQL, unfortunately it didn't work for me. I have created ODBC source for MySQL database and field mappings, but after I click &lt;b&gt;Preview&lt;/b&gt; or &lt;b&gt;Finish&lt;/b&gt; button it gives me following error:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Arial;font-size:medium;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://4.bp.blogspot.com/_lIUoWyT2JyU/TT5LcfQmvqI/AAAAAAAAAAM/r4Zo3O-QoOM/s1600/c37e6f8f60faeb54b7037101256c85b3.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 140px;" src="http://4.bp.blogspot.com/_lIUoWyT2JyU/TT5LcfQmvqI/AAAAAAAAAAM/r4Zo3O-QoOM/s320/c37e6f8f60faeb54b7037101256c85b3.png" alt="" id="BLOGGER_PHOTO_ID_5565969142276079266" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Arial;font-size:medium;"  &gt;This error happened on every MySQL databases and tables I've tried.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Arial;font-size:medium;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Arial;font-size:medium;"  &gt;Not willing to waste anymore time, I write following script to do the migration.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Arial;font-size:medium;"  &gt;Its simple but it works and I hope it will be useful for anyone.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Arial;font-size:medium;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Arial;font-size:medium;"  &gt;Thanks..&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Arial;font-size:medium;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Arial;font-size:medium;"  &gt;&lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;exec&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;master&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;dbo&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;sp_addlinkedserver&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;@server&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;=&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;N'mysql'&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;      @srvproduct&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;N'MySQL'&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;,&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;@provider&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;N'MSDASQL'&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;      @provstr&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;N'DRIVER={MySQL ODBC 5.1 Driver}; SERVER=mysqlserver ; DATABASE=mysqldb; UID=root; PASSWORD=; OPTION=3'&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;exec&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;master&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;dbo&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;sp_addlinkedsrvlogin&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;@rmtsrvname&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;N'mysql'&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;@useself&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;=&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;N'True'&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;      @locallogin&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;=NULL,&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;@rmtuser&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;=NULL,&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;@rmtpassword&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;=NULL&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;go&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;declare&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;@name&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;varchar&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;100&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;),&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;@sql&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;nvarchar&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;(&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;max&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;declare&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;tablec&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;cursor&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;for&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;select&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;*&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;from&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;openquery&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;mysql&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;'show tables'&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;open&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;tablec&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;while&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;1&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;=&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;begin&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;      &lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;fetch&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;next&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;from&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;tablec&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;into&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;@name&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;      &lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;if&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;@@FETCH_STATUS&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;&lt;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;0&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;break&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;      &lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;print&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;@name       &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;      &lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;set&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;@sql&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;=&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;'select * into ['&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;+&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;@name&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;+&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;'] from openquery(mysql,''select * from `'&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;+&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;@name&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;+&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;'`'')'&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;      &lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;exec&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;@sql&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;deallocate&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;tablec&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(1, 1, 1);font-family:Courier New;font-size:85%;"  &gt;&lt;span style="font-size:10pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7621745973186676318-2973576230250835832?l=kittenheart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kittenheart.blogspot.com/feeds/2973576230250835832/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://kittenheart.blogspot.com/2011/01/migrate-from-mysql-to-ms-sql-using-odbc.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7621745973186676318/posts/default/2973576230250835832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7621745973186676318/posts/default/2973576230250835832'/><link rel='alternate' type='text/html' href='http://kittenheart.blogspot.com/2011/01/migrate-from-mysql-to-ms-sql-using-odbc.html' title='Migrate from Mysql to Ms Sql using odbc and linked server'/><author><name>wijayadi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_lIUoWyT2JyU/TT5LcfQmvqI/AAAAAAAAAAM/r4Zo3O-QoOM/s72-c/c37e6f8f60faeb54b7037101256c85b3.png' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
