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

Is Update Possible Without Creating New Table

forums forums SQLyog Using SQLyog Is Update Possible Without Creating New Table

  • This topic is empty.
Viewing 7 reply threads
  • Author
    Posts
    • #12484
      watto
      Member

      Hi there

      I am seeking assistance with an UPDATE i require to perform.

      I am 'OK' with SQL but by no means really proficient with it.

      I have identified the records that i wish to update through a query but i am unable to perform the update i wish.

      Hopefully a screen shot will help (showing how i have identified the records i wish to update)

      [img]http://C:UsersKeithDocumentsBusinessClientsASTSQLyogupdate posting.jpg[/img]

      Image also attached.

      In summary: I have 2 tables (account and packages).

      Both tables have common key field of customer_id

      Both table have a field named account_owner but i have a number of records in the packages table that are missing the appropriate account_owner detail.

      What i am looking for is the appropriate SQL so that i can update the account_owner in the packages table to match the account_owner entry in the accounts table.

      I do have UPDATE permissions but i am unable to create new tables in the database.

      Help will be appreciated.

      Keith

    • #32746
      Jan.S
      Member

      Hi Keith,

      Can you attach the image using the attach button below rather than the insert image button above, in the editor?

      Also, are you looking for a query or is there a specific error that you get when you run your query?

      Update is possible without CREATE privileges if you have the UPDATE privilege.

      Regards,

      Janani

    • #32747
      watto
      Member
      'watto' wrote:

      Hi there

      I am seeking assistance with an UPDATE i require to perform.

      I am 'OK' with SQL but by no means really proficient with it.

      I have identified the records that i wish to update through a query but i am unable to perform the update i wish.

      Hopefully a screen shot will help (showing how i have identified the records i wish to update)

      [img]http://C:UsersKeithDocumentsBusinessClientsASTSQLyogupdate posting.jpg[/img]

      Image also attached.

      In summary: I have 2 tables (account and packages).

      Both tables have common key field of customer_id

      Both table have a field named account_owner but i have a number of records in the packages table that are missing the appropriate account_owner detail.

      What i am looking for is the appropriate SQL so that i can update the account_owner in the packages table to match the account_owner entry in the accounts table.

      I do have UPDATE permissions but i am unable to create new tables in the database.

      Help will be appreciated.

      Keith

    • #32748
      watto
      Member
      'watto' wrote:

      Hi there

      I am seeking assistance with an UPDATE i require to perform.

      I am 'OK' with SQL but by no means really proficient with it.

      I have identified the records that i wish to update through a query but i am unable to perform the update i wish.

      Hopefully a screen shot will help (showing how i have identified the records i wish to update)

      [img]http://C:UsersKeithDocumentsBusinessClientsASTSQLyogupdate posting.jpg[/img]

      Image also attached.

      In summary: I have 2 tables (account and packages).

      Both tables have common key field of customer_id

      Both table have a field named account_owner but i have a number of records in the packages table that are missing the appropriate account_owner detail.

      What i am looking for is the appropriate SQL so that i can update the account_owner in the packages table to match the account_owner entry in the accounts table.

      I do have UPDATE permissions but i am unable to create new tables in the database.

      Help will be appreciated.

      Keith

    • #32749
      watto
      Member

      Hi Janani

      As you can see i am new to this stuff (adding replies etc), sorry about that.

      I have tried to attache a screen shot of how i identified the records i wish to update.

      I wish to use a query to update the records.

      Regards, Keith

    • #32750
      peterlaursen
      Participant

      I think you finally figured out how to add files here! 🙂

      Once you have the result set as in your image just change the dorpdown from 'Read Only' to the name of the table you want to update. Now the DATA GRID is writeable. Whenever you click on 'save* (the diskette icon) you will save. You will alos save whne the GRID-cursor moves to another row of the result set.

      Please see image [attachment=1651:writeable.jpg]

      Did this help?

    • #32751
      watto
      Member
      'peterlaursen' wrote:

      I think you finally figured out how to add files here! 🙂

      Once you have the result set as in your image just change the dorpdown from 'Read Only' to the name of the table you want to update. Now the DATA GRID is writeable. Whenever you click on 'save* (the diskette icon) you will save. You will alos save whne the GRID-cursor moves to another row of the result set.

      Please see image [attachment=1651:writeable.jpg]

      Did this help?

      Peter, Thanks for your reply

      Did it help? Yes and No!

      Yes, i can do the update manually.

      But No in that this s something that i wish to do regularly and preferably not manually. I was hoping to discover if i could create some SQL to do the update?

      I do have permissions to create 'views' if that would help?

      Regards, Keith

    • #32752
      peterlaursen
      Participant

      Of course you can write an UPDATE statement as well. Once you have the SELECT statement returning the rows you want it can easily be modified to an UPDATE statement.

      MySQL documentation http://dev.mysql.com/doc/refman/5.1/en/update.html

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