Results 1 to 3 of 3
  1. #1
    Join Date
    May 2009

    Unanswered: Need help with an update script

    A newbie and therefore a basic question.

    currently I have the following sql script:

    Update settings set Name= 'Test';

    I would like to add the current date/time to the value.

    to calculate current date/time I have the following:

    SELECT TO_CHAR(SYSDATE,'mm/dd/yyyy--hh24:mi') FROM sys.dual;

    The question is how to put together the hard coded value 'Test' and the current date/time in a script and then update the field.

    For example after the update statement is run, the value for the field 'name' might be 'Test -- 05/09/2009--11:46'

    Any help in constructing this update sql script would be appreciated. Thanks.

  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    Update settings set Name= 'Test - '||TO_CHAR(SYSDATE,'mm/dd/yyyy--hh24:mi');
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    May 2009


    Thanks for the quick response. It worked.

Posting Permissions

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