Results 1 to 2 of 2

Thread: How to run the following Update query correctly

  1. #1
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default How to run the following Update query correctly

    Hi,

    I want to update two fields in a table but I want to set the values using select statements?

    UPDATE table SET column1=(SELECT a from x where b =table.id), column2=(SELECT z from x where b =table.id)

    Is this possible?
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

  2. #2
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Re: How to run the following Update query correctly

    Have this sorted.

    I need to use Where Exists at the end of the statement
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Update Query in Merge
    By DerekWait7 in forum Developer Help
    Replies: 0
    Last Post: 2009-11-18, 06:55 AM
  2. Replies: 4
    Last Post: 2008-03-27, 02:10 PM
  3. Update Query
    By kongara in forum Developer Help
    Replies: 1
    Last Post: 2007-08-08, 12:51 AM
  4. Update Query question
    By asimzaidi in forum Help
    Replies: 2
    Last Post: 2007-07-09, 05:57 AM
  5. Employees Mass Update Labels Not Showing Correctly After Upgrade to 4.5.1b
    By mpoweringu in forum Installation and Upgrade Help
    Replies: 1
    Last Post: 2007-03-27, 02:09 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •