forums › forums › SQLyog › Sync tools, Migration, Scheduled Backup and Notifications › Migration Toolkit
- This topic is empty.
-
AuthorPosts
-
-
June 4, 2010 at 10:35 am #11986mkgreidiMember
Hello
I´m working with Mysqlyog for the first time and I have a problem with migration toolkit.
I saw when you select a database you can select the tables and the fields you want to migrate.But in WHERE clause I can´t compare with other fields of other tables in the same database.
For example:
I can do this to migrate the table “table1” WHERE field1=30
But I can do that WHERE table1.field1=30 AND table1.field2=table2.field1
Is it possible to do it with the migration toolkit?How can I do it?
I have to import everyday a table with over 8 million registers, but I don´t need much of them.
Thanks
P.S:Sorry for my very bad english 😛
-
June 4, 2010 at 1:47 pm #30902peterlaursenParticipant
Sorry it took a little time to reply where, but nobody remembered full details about this.
There is a limitation in our code here with JOINS (and what you are doing (the construction table1.field2=table2.field1) is actually a “JOIN in the WHERE-clause”).
However if the ODBC-source supports subqueries you can use a subquery in the WHERE-clause. Try replace
Code:table1.field2=table2.field1with
Code:table1.field2 IN (SELECT field1 FROM table2) -
June 7, 2010 at 10:02 am #30903mkgreidiMember
Thanks for answer
I try to make your suggestion but it shows an error.
I write in WHERE clause cod_tar IN (SELECT cod_tar FROM tl_precios) but shows me the message error “[DataDirect][ODBC OPENEDGE driver][OPENEDGE]Syntax error in SQL statement at or about “'tl_tarifas') and 1=0″ (10713)”
What does it mean?How can I solve it?
[attachment=1376:example_error.jpg]
-
June 7, 2010 at 11:09 am #30904KhushbooMember
Hi,
You have used single quotes(') for the table name tl_tarifas which caused this error.
Instead, please use Backticks(`) for table and try again.
Thanks & Regards,
Khushboo
-
June 7, 2010 at 11:10 am #30905peterlaursenParticipant
Maybe this database does not support subqueries. Can you try to execute a similar subquery from some other interface?
Also you may need to experiment with paranthesis'es.
-
June 7, 2010 at 11:12 am #30906peterlaursenParticipant
I do not know if OpenEdge uses backticks or whatever for quoting identifiers. The syntax in the WHERE clause must follow the SQL-dialect of.
-
June 7, 2010 at 4:01 pm #30907mkgreidiMember
If I try to import with the option “use a query to specify the data to transfer” it doesn´t work too.
I write the query SELECT * FROM `tl_tarifas` but it shows me the error
[DataDirect][ODBC OPENEDGE driver][OPENEDGE]Syntax error in SQL statement at or about “tl_tarifas”(10713)
I used the quotes and backsticks, and try to use a subquery but when I specified the table name always have the same error.
Sorry,but it´s the first time I use this software and I don´t fins many information.
-
June 8, 2010 at 9:19 am #30908peterlaursenParticipant
Unfortunately we almost do not know the source-database you are using. It will take some time before we can advice further.
-
June 8, 2010 at 11:10 am #30909mkgreidiMember
I don´t know if this maybe can help you but the source-database is Progress.
It´s my fault not to specify before,sorry.
Thank you
-
June 8, 2010 at 1:46 pm #30910peterlaursenParticipant
We can see what database it is from the error returned by the ODBC-driver – so we already figured out.
We will need to download a TRIAL (if exists) of this software and install it tomorrow.
-
-
AuthorPosts
- You must be logged in to reply to this topic.