Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2015
    Posts
    27

    Post Unanswered: Using greater than within an update statement

    I created this unique codes and


    I need all [FRMDAT] field set to 12/31/2014 in the MKLOPT table, where the [JOBCOD] in the VALUE list BELOW have a [FRMDAT] that is currently (greater than) > 12/31/2014




    VALUE LIST


    PH00059


    PH02775


    PH03051


    PH03305


    PH03336


    PH03342


    PH03371


    PH03992


    PH03993


    PH03994

  2. #2
    Join Date
    Oct 2014
    Posts
    268
    Provided Answers: 6
    Code:
    UPDATE MKLOPT
    SET FRMDAT = '12/31/2014'
    WHERE (FRMDAT > '12/31/2014' AND JOBCOD IN ( PH03994, .......))
    Code:
    //*Test with a select first before update. *// 
    
    SELECT JOBCOD, FRMDAT 
    FROM MKLOPT 
    WHERE  (FRMDAT > '12/31/2014' AND JOBCOD IN ( PH03994, .......))]
    Run the bottom SQL first to see if you get your desired results.

Tags for this Thread

Posting Permissions

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