mySQL update insert

Posted on 2011-04-24
Last Modified: 2012-05-11
I am trying to execute this mySQL statement here but it isn't working here is the code

Open in new window

UPDATE LISTINGS SET creationDate = (SELECT CONCAT('-','year','month','day') from LISTINGS);

basically its a old table that has YY,MM,DD in separate columns i want to combine them into one field called creationDate with the proper mySQL date format.  
Question by:stargateatlantis
    LVL 38

    Expert Comment

    by:Aaron Tomosky
    Get rid of the select, from listings.
    LVL 40

    Accepted Solution

    try like this.
       SET creationDate = CONCAT('-','year','month','day');

    Open in new window


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Both Easy and Powerful How easy is PHP? (  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
    Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now