Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2007
    Location
    Manila, Philippines
    Posts
    132

    Unanswered: assigning variables

    hi to all,
    how can i assign variables in a regex?
    e.g.
    Code:
    sum(coding_log.break_hours) as 'total break',
    and use it to another regex.
    thanks
    Take Nothing But Pictures;
    Leave Nothing But Footprints;
    Kill Nothing But Time;

  2. #2
    Join Date
    Oct 2007
    Location
    Manila, Philippines
    Posts
    132
    Code:
    SUM(CASE WHEN coding_log.time_end > '16:00' THEN coding_log.break_hours ELSE 0 END) as 'Total OT Break',
    
    -- total ot idle work related
    format(time_to_sec(SUM(CASE WHEN coding_log.time_end > '16:00' && coding_log.adjustment = 'Idle (work related)'
            THEN coding_log.adjustment_time ELSE 0 END))/3600,2)
            as 'Total OT Idle (work related)',
    
    -- total ot idle personal
    format(time_to_sec(SUM(CASE WHEN coding_log.time_end > '16:00' && coding_log.adjustment = 'Idle (personal)'
            THEN coding_log.adjustment_time ELSE 0 END))/3600,2)
            as 'Total OT Idle (personal)',
    
    -- total ot meeting
    format(time_to_sec(SUM(CASE WHEN coding_log.time_end > '16:00' && coding_log.adjustment = 'meeting'
            THEN coding_log.adjustment_time ELSE 0 END))/3600,2)
            as 'Total OT Meeting',
    
    -- total ot orientation
    format(time_to_sec(SUM(CASE WHEN coding_log.time_end > '16:00' && coding_log.adjustment = 'orientation'
            THEN coding_log.adjustment_time ELSE 0 END))/3600,2)
            as 'Total OT Orientation',
    i like to add 'Total OT Break', 'Total OT Idle (work related)', 'Total OT Idle (personal)'.

    any advice, please.

    thanks
    Take Nothing But Pictures;
    Leave Nothing But Footprints;
    Kill Nothing But Time;

Posting Permissions

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