Get Data from MySql And Sql server tables

  • Hi,

    I want data from Sql Server & MySql. Tables & columns are different in both databases. So what I did I created a mapped table in SqlServer:
    i.e. questionMapping:


    Id    MySqlTable    MySqlQuestion    MySqlQuestionId    SqlTable    SqlQuestion    SqlQuestionId
    1    questions    NULL    1    table1    NULL    1
    2    questions    NULL    2    table1    NULL    2
    3    questions    NULL    3    table1    NULL    3
    4    questions    NULL    4    table1    NULL    4
    5    questions    NULL    5    table1    NULL    5
    6    questions    NULL    6    table1    NULL    6
    7    questions    NULL    7    table1    NULL    7
    8    questions    NULL    8    table2    NULL    1
    9    questions    NULL    10    table2    NULL    2
    10    questions    NULL    11    table2    NULL    3
    11    questions    NULL    12    table2    NULL    4
    12    questions    NULL    13    table2    NULL    5

    There are more than 10 tables in Sql Server and 4 Tables in MySql

    I need to map Some data e.g. questions and there respective answers from both databases. But Questions are stored in different words on both databases. So I am creating dynamical query in Sql Stored procedure to get the values from Sql Server. I.e. get the values from one table with join then store in temp, get the values from second table then store in temp table and so on. I am using cursor for this(loop).

    I have not succed till now. So what can be the good way to do this. Experts will you share your ideas.

    Regards,
    Hem Raj

    Thanks & Regards,
    Hem Singh

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply