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 -> Time range calculations

Time range calculations

From: Diego Buendia <dbuendiab_at_yahoo.es>
Date: 13 Jan 2004 15:25:17 -0800
Message-ID: <71e97616.0401131525.19e630c@posting.google.com>


Hello:

Coming from 5 years of SQL Server development and administration, I am now in a Oracle development project, so I'm studying and trying a lot of new things. It's an exciting thing to learn.

My preliminar impression as developer is that Oracle seems more powerful than SQL Server, and the PL/SQL language is more advanced and modern than T/SQL, but on the other hand all the Oracle thing is slower on Windows machines and maybe for a medium business with no cross-platform issues SQL Server is easier to get with. Well, I don't feel too much incomfortable, you know, as with the programming languages, having learned one you have got much of all the others.

The thing I am confused right now is with the DATE type of data. I am using tables with scheduling data that define the working day for several types of people. Some of then get into their job at 8:00am and get out at 20:00am, and other have a rest at noon, having then two segments of working time. In SQL Server, I used to insert values for time-only columns:

insert tb_schedule values ( 1, 1, 'L', '08:00', '20:00' )

and, as SQL Server defaults the date part to 1/1/1900, the differences between times were consistents. Now, Oracle defaults to the first day of the current month (why?!) so if I update a date in the future I won't have the figured result, as the month will be shifted if I don't apply the corresponding workaround. Moreover, yet I haven't found what the simplest syntax to apply to get an equivalent to the former SQL Server sentence.

If someone can give me any advice I will be grateful. Thanks,

Diego Buendia
Barcelona, Spain Received on Tue Jan 13 2004 - 17:25:17 CST

Original text of this message

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