Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Importing Into Column From Csv

forums forums SQLyog Using SQLyog Importing Into Column From Csv

  • This topic is empty.
Viewing 4 reply threads
  • Author
    Posts
    • #12021
      Mike S
      Member

      Good morning everyone!

      I have a messageboard that has a Microsoft SQL 2000 database, and I am bringing that into vBulletin, which is MySQL.

      The problem I am having is bringing in thread titles.

      The MSSQL and MySQL columns are both varchar(250), when I use SQLyog to import “Subject” from cs_Posts into the “title” column of the “thread” table, it says it completes successfully but when I go into the data, the entire thread column is blank, as of nothing imported at all.

      I exported to a CSV next, then used the Import utility in SQL to bring in the CSV file to the “title” column to get my thread titles imported, but the issue I am having now, is it imports, but it appears to create new rows, not update existing.

      I want to update the existing rows starting with the first one and match the CSV to the rows from top to bottom.

      Please help!!!!

    • #31017

      Hey Mike,

      This forum is for queries pertaining to MONyog — MySQL Monitor. I'm sure you meant to post in one of the SQLyog forums… so let me just move the post for you, and I'm sure somebody will reply to your query at the earliest.

    • #31018
      Khushboo
      Member

      Hi Mike,

      Quote:
      The MSSQL and MySQL columns are both varchar(250), when I use SQLyog to import “Subject” from cs_Posts into the “title” column of the “thread” table, it says it completes successfully but when I go into the data, the entire thread column is blank, as of nothing imported at all.

      When import job completes, wizard shows how many rows are transfered, please check if it shows 0 rows transferred.

      Also, please check what option you have selected in Import External Data –> Advanced Options?

      (see the screenshots)

      Quote:
      I exported to a CSV next, then used the Import utility in SQL to bring in the CSV file to the “title” column to get my thread titles imported, but the issue I am having now, is it imports, but it appears to create new rows, not update existing.

      Please use “Import into existing table” and “Update with source details” options in Import External Data –> Advanced options.

      Thank You.

      Regards,

      Khushboo

    • #31019
      Mike S
      Member
      'Khushboo' wrote on '01:

      Hi Mike,

      When import job completes, wizard shows how many rows are transfered, please check if it shows 0 rows transferred.

      Also, please check what option you have selected in Import External Data –> Advanced Options?

      (see the screenshots)

      Please use “Import into existing table” and “Update with source details” options in Import External Data –> Advanced options.

      Thank You.

      Regards,

      Khushboo

      Thank you for the reply, Khushboo.

      But, I am using those options and it still puts new rows onto the end where the last row is (aka not updating, just creating)

      Unfortunately I can't use the “Drop and recreate” option because it deletes all the columns in the thread table except for the title column.

    • #31020
      Khushboo
      Member

      Hi Mike,

      Please check if your table created at target has a primary key?

      If the table does not have primary key, new rows will added at end but if it has then existing rows will be updated.

      So in your case, table should have a primary key to update existing table.

      You can send us the create table structure if the issue persist.

      Thank & Regards,

      Khushboo

Viewing 4 reply threads
  • You must be logged in to reply to this topic.