Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Time Statement

Status
Not open for further replies.

Ringers

Technical User
Feb 26, 2004
180
AU
Hi,
I am trying to change the time field SS_START_DATE_TIME to 01:30 from table F_SESSIONSUMM where the time is equal to 02:31.

Here is what I have so far, but it doesn't work so if anyone knows how, thanks.


update F_SESSIONSUMM
set SS_START_DATE_TIME =
TO_CHAR(SS_START_DATE_TIME, 'HH:MI:SS')= '01:30:00'
where TO_CHAR (SS_START_DATE_TIME, 'HH:MI:SS') = '02:31:00'
 
Hi,
What is the Actual DataType of that field?
If it is not a Varchar2 type then your code will not work, since you are creating a string value not a Time or Date.

If it is a Date field ( or a Timestamp) that just has the time then use ( I think):
Code:
update F_SESSIONSUMM 
set SS_START_DATE_TIME = 
TO_DATE('01:30:00','HH:MI:SS') 
where TO_CHAR (SS_START_DATE_TIME, 'HH:MI:SS')  = '02:31:00'



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top