MySQL 5.1 - I want to duplicate data from joined columnCopy values from one column to another in the same tableSelect all columns except one in MySQL?Can I concatenate multiple MySQL rows into one field?Should I use the datetime or timestamp data type in MySQL?Find duplicate records in MySQLHow to join (merge) data frames (inner, outer, left, right)mysql_fetch_array()/mysql_fetch_assoc()/mysql_fetch_row()/mysql_num_rows etc… expects parameter 1 to be resource or resultDuplicating a MySQL table, indices, and dataSQL select only rows with max value on a columnRemove duplicate values from JS arrayMySQL error code: 1175 during UPDATE in MySQL Workbench

What's a good pattern to calculate a variable only when it is used the first time?

What's the relationship betweeen MS-DOS and XENIX?

What are some tips and tricks for finding the cheapest flight when luggage and other fees are not revealed until far into the booking process?

Build a mob of suspiciously happy lenny faces ( ͡° ͜ʖ ͡°)

What allows us to use imaginary numbers?

Problem with GFCI at start of circuit with both lights and two receptacles

Adding things to bunches of things vs multiplication

What exactly happened to the 18 crew members who were reported as "missing" in "Q Who"?

Short comic about alien explorers visiting an abandoned world with giant statues that turn out to be alive but move very slowly

Gofer work in exchange for LoR

Is this really better analyzed in G minor than in Bb?

Why do so many people play out of turn on the last lead?

Why does Japan use the same type of AC power outlet as the US?

Is there a fallacy about "appeal to 'big words'"?

Quick destruction of a helium filled airship?

How to mock ApexTestQueueItem, AsyncApexJob, and ApexTestResult for test coverage?

A Magic Diamond

How to gracefully leave a company you helped start?

What should we do with manuals from the 80s?

Why should I pay for an SSL certificate?

What should I do with the stock I own if I anticipate there will be a recession?

Why does "auf der Strecke bleiben" mean "to fall by the wayside"?

When did Bilbo and Frodo learn that Gandalf was a Maia?

Why is su world executable?



MySQL 5.1 - I want to duplicate data from joined column


Copy values from one column to another in the same tableSelect all columns except one in MySQL?Can I concatenate multiple MySQL rows into one field?Should I use the datetime or timestamp data type in MySQL?Find duplicate records in MySQLHow to join (merge) data frames (inner, outer, left, right)mysql_fetch_array()/mysql_fetch_assoc()/mysql_fetch_row()/mysql_num_rows etc… expects parameter 1 to be resource or resultDuplicating a MySQL table, indices, and dataSQL select only rows with max value on a columnRemove duplicate values from JS arrayMySQL error code: 1175 during UPDATE in MySQL Workbench






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I'm trying to copy columns of data from 2 joined tables in different schemas.



I've joined and happy with the result - but get errors when I try to use code that I've found on here to copy the data.



I'm using MySQL 5.1 and can not upgrade.



I need to copy the values from ampp.vppid (t2?) directly over to medicament.CODE3 (t1?)



I have tried the following:



select * from mls.medicament t1 join dmd.ampp t2 on t2.APPID = t1.code1
set t1.CODE3 = t2.VPPID;









share|improve this question
























  • stackoverflow.com/questions/9001939/… you can have a look over this, this will help you

    – Narendra Chouhan
    Mar 27 at 13:00











  • Thanks, I came across this one during my search. The problem I have is because the tables are joined - I can not seem to get the basic commands to work. I also think my version of MySQL (5.1) is restricting my efforts.

    – Wayne Simpson
    Mar 27 at 13:06











  • No - sorry but your answer does not specifically solve my problem - specifically it does not mention how to accomplish this with joined tables.

    – Wayne Simpson
    Mar 27 at 14:06

















0















I'm trying to copy columns of data from 2 joined tables in different schemas.



I've joined and happy with the result - but get errors when I try to use code that I've found on here to copy the data.



I'm using MySQL 5.1 and can not upgrade.



I need to copy the values from ampp.vppid (t2?) directly over to medicament.CODE3 (t1?)



I have tried the following:



select * from mls.medicament t1 join dmd.ampp t2 on t2.APPID = t1.code1
set t1.CODE3 = t2.VPPID;









share|improve this question
























  • stackoverflow.com/questions/9001939/… you can have a look over this, this will help you

    – Narendra Chouhan
    Mar 27 at 13:00











  • Thanks, I came across this one during my search. The problem I have is because the tables are joined - I can not seem to get the basic commands to work. I also think my version of MySQL (5.1) is restricting my efforts.

    – Wayne Simpson
    Mar 27 at 13:06











  • No - sorry but your answer does not specifically solve my problem - specifically it does not mention how to accomplish this with joined tables.

    – Wayne Simpson
    Mar 27 at 14:06













0












0








0








I'm trying to copy columns of data from 2 joined tables in different schemas.



I've joined and happy with the result - but get errors when I try to use code that I've found on here to copy the data.



I'm using MySQL 5.1 and can not upgrade.



I need to copy the values from ampp.vppid (t2?) directly over to medicament.CODE3 (t1?)



I have tried the following:



select * from mls.medicament t1 join dmd.ampp t2 on t2.APPID = t1.code1
set t1.CODE3 = t2.VPPID;









share|improve this question














I'm trying to copy columns of data from 2 joined tables in different schemas.



I've joined and happy with the result - but get errors when I try to use code that I've found on here to copy the data.



I'm using MySQL 5.1 and can not upgrade.



I need to copy the values from ampp.vppid (t2?) directly over to medicament.CODE3 (t1?)



I have tried the following:



select * from mls.medicament t1 join dmd.ampp t2 on t2.APPID = t1.code1
set t1.CODE3 = t2.VPPID;






mysql join duplicates






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 27 at 12:28









Wayne SimpsonWayne Simpson

12 bronze badges




12 bronze badges















  • stackoverflow.com/questions/9001939/… you can have a look over this, this will help you

    – Narendra Chouhan
    Mar 27 at 13:00











  • Thanks, I came across this one during my search. The problem I have is because the tables are joined - I can not seem to get the basic commands to work. I also think my version of MySQL (5.1) is restricting my efforts.

    – Wayne Simpson
    Mar 27 at 13:06











  • No - sorry but your answer does not specifically solve my problem - specifically it does not mention how to accomplish this with joined tables.

    – Wayne Simpson
    Mar 27 at 14:06

















  • stackoverflow.com/questions/9001939/… you can have a look over this, this will help you

    – Narendra Chouhan
    Mar 27 at 13:00











  • Thanks, I came across this one during my search. The problem I have is because the tables are joined - I can not seem to get the basic commands to work. I also think my version of MySQL (5.1) is restricting my efforts.

    – Wayne Simpson
    Mar 27 at 13:06











  • No - sorry but your answer does not specifically solve my problem - specifically it does not mention how to accomplish this with joined tables.

    – Wayne Simpson
    Mar 27 at 14:06
















stackoverflow.com/questions/9001939/… you can have a look over this, this will help you

– Narendra Chouhan
Mar 27 at 13:00





stackoverflow.com/questions/9001939/… you can have a look over this, this will help you

– Narendra Chouhan
Mar 27 at 13:00













Thanks, I came across this one during my search. The problem I have is because the tables are joined - I can not seem to get the basic commands to work. I also think my version of MySQL (5.1) is restricting my efforts.

– Wayne Simpson
Mar 27 at 13:06





Thanks, I came across this one during my search. The problem I have is because the tables are joined - I can not seem to get the basic commands to work. I also think my version of MySQL (5.1) is restricting my efforts.

– Wayne Simpson
Mar 27 at 13:06













No - sorry but your answer does not specifically solve my problem - specifically it does not mention how to accomplish this with joined tables.

– Wayne Simpson
Mar 27 at 14:06





No - sorry but your answer does not specifically solve my problem - specifically it does not mention how to accomplish this with joined tables.

– Wayne Simpson
Mar 27 at 14:06












2 Answers
2






active

oldest

votes


















0














Copy values from one column to another in the same table



you can have a look over this, this will help you and let you solve your problem






share|improve this answer
































    0














    For anyone who may be interested - using update with an inner join worked.



    I moved the table I was referencing into the same Schema to keep it simple - as it didn't need its own Schema.



    update mls.medicament A inner join mls.amp B on A.CODE1 = B.APID set A.CODE3=B.vpid;





    share|improve this answer



























      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55377219%2fmysql-5-1-i-want-to-duplicate-data-from-joined-column%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      Copy values from one column to another in the same table



      you can have a look over this, this will help you and let you solve your problem






      share|improve this answer





























        0














        Copy values from one column to another in the same table



        you can have a look over this, this will help you and let you solve your problem






        share|improve this answer



























          0












          0








          0







          Copy values from one column to another in the same table



          you can have a look over this, this will help you and let you solve your problem






          share|improve this answer













          Copy values from one column to another in the same table



          you can have a look over this, this will help you and let you solve your problem







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 27 at 13:08









          Narendra ChouhanNarendra Chouhan

          5833 silver badges11 bronze badges




          5833 silver badges11 bronze badges


























              0














              For anyone who may be interested - using update with an inner join worked.



              I moved the table I was referencing into the same Schema to keep it simple - as it didn't need its own Schema.



              update mls.medicament A inner join mls.amp B on A.CODE1 = B.APID set A.CODE3=B.vpid;





              share|improve this answer





























                0














                For anyone who may be interested - using update with an inner join worked.



                I moved the table I was referencing into the same Schema to keep it simple - as it didn't need its own Schema.



                update mls.medicament A inner join mls.amp B on A.CODE1 = B.APID set A.CODE3=B.vpid;





                share|improve this answer



























                  0












                  0








                  0







                  For anyone who may be interested - using update with an inner join worked.



                  I moved the table I was referencing into the same Schema to keep it simple - as it didn't need its own Schema.



                  update mls.medicament A inner join mls.amp B on A.CODE1 = B.APID set A.CODE3=B.vpid;





                  share|improve this answer













                  For anyone who may be interested - using update with an inner join worked.



                  I moved the table I was referencing into the same Schema to keep it simple - as it didn't need its own Schema.



                  update mls.medicament A inner join mls.amp B on A.CODE1 = B.APID set A.CODE3=B.vpid;






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Apr 3 at 13:29









                  Wayne SimpsonWayne Simpson

                  12 bronze badges




                  12 bronze badges






























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55377219%2fmysql-5-1-i-want-to-duplicate-data-from-joined-column%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                      SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                      은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현