This discussion is archived
2 Replies Latest reply: Mar 27, 2012 2:21 PM by 926700 RSS

updating DB values

926700 Newbie
Currently Being Moderated
Hi

I'm trying to update records to allow for clocks going forward - main obstacle being that clockin_time is a varchar

create table CLOCKS(

ID Number (8),
clockin_time VARCHAR (8)
);

INSERT INTO CLOCKS
VALUES (001, '07:50');

I've been playing around with to_char and to_date but cant seem to get it quite right....

tried

UPDATE CLOCKS
SET clockin_time = to_date(clockin_time +1/24, 'hh:mi')
WHERE ID = 001;

I know it's not close but I am relatively new to this so any help would be greatly appreciated!

Edited by: 923697 on Mar 27, 2012 8:08 AM

Edited by: 923697 on Mar 27, 2012 8:18 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points