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

Add Extra Fields While Importing Data?

forums forums SQLyog Sync tools, Migration, Scheduled Backup and Notifications Add Extra Fields While Importing Data?

  • This topic is empty.
Viewing 2 reply threads
  • Author
    Posts
    • #9596
      TGKnIght
      Member

      When I add extra column into the “Create Table SQL Statement” in the “Migration Toolkit” why don't the extra columns appear in “Column Mapping and Transformations” ?

      My problem is… I have a table already created..

      Example :

      Code:
      CREATE TABLE `location` (
      `ID` int(10) NOT NULL auto_increment,
      `ProgramID` int(10) NOT NULL default '0',
      `ExternalID` varchar(100) NOT NULL default '',
      `ExternalGroup` varchar(50) default NULL,
      `Description` varchar(100) default NULL,
      `Amount` decimal(19,4) NOT NULL default '0.0000',
      `DateUpdated` datetime default '0000-00-00 00:00:00',
      `DateAdded` datetime NOT NULL default '0000-00-00 00:00:00',
      `Active` tinyint(1) unsigned NOT NULL default '0'
      )

      I am trying to import a customer's data… which only has 3 of the fields in this table… 'ExternalID', 'ExternalGroup' and 'Description'..

      I would like to fill the rest of the row with static information… And I would like ID to increment automatically by itself…

      What is the best way to do this?

      Thank you,

      Owen

    • #21168
      peterlaursen
      Participant

      the best way would be .. I think …

      1) Run the Migration

      2) ALTER TABLE

      if you want it fully automated you can create a batch file that 1)first executes a SJA-importjob 2)next executes a SJA-notify job doing the ALTER TABLE.

      just like

      *******************

      sja myimportjob.xml

      sja mynotifyjob.xml

      *******************

      http://www.webyog.com/faq/27_35_en.html

    • #21169
      TGKnIght
      Member

      Ahh nice, the batch file suggestion is what I need…

      I'll try to import the client data as is to a temp table, then run a second job which will populate the production table correctly.

      Thanks alot!

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