Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Can I use the TO_DATE function in views for INSERTS and UPDATES?

Can I use the TO_DATE function in views for INSERTS and UPDATES?

From: John Mara <john.mara_at_connects.com>
Date: 1997/01/30
Message-ID: <5cqtdi$r23@news.mr.net>#1/1

I'm looking for help with a Powerbuilder 5.0 Oracle 7.3 problem. We have a table defined that tracks the open and close times for a business. The column used in the table is defined as datatype DATE. We only use the time portion of the date (i.e. the month, day and year are meaningless). The time can be entered using the TO_DATE function: TO_DATE( "MON_BEG_TM", 'HH24:MI:SS') and extracted using the TO_CHAR function TO_CHAR( "MON_BEG_TM", 'HH24:MI:SS'). The Powerbuilder program could format the data both ways but it would be easier to hide this by using views. We created a view to SELECT against that uses the TO_CHAR function to format the date for us. This works nicely.

Can we create a view that would allow us to INSERT/UPDATE the DATE columns in the table while supplying only the time components of the date (i.e. apply the TO_DATE function through a view)?

Thanks. Received on Thu Jan 30 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US