Viewing 15 posts - 271 through 285 (of 549 total)
No problem. I thought all your hours were of the form 10:00, 13:00, etc.
All you need to do is change the overlaphours function and calculate the overlap in minutes.
Instead of
datediff(hh,...
use
datediff(mi,...
It...
May 12, 2008 at 2:28 am
As Jerimy said, you need to install the Oracle Client on the computer running your SQL Server instance. To test the presence of the Oracle client and connectivity to an...
May 11, 2008 at 9:01 am
So what's the proper way to cut/paste code without all the relational operators getting clobbered and parenthesis becoming smiley faces?
In any case, I attach the files.
May 10, 2008 at 12:19 am
I think the approach is to find all possible gaps (DatoTo-DateFrom) intervals. Then for each such gap see if it overlaps any of the original DateFrom-DateTo intervals. If no, it's...
May 9, 2008 at 8:15 am
Here is a live example taken from my computer which has both SS2000 and Oracle 9 installed.
In Oracle
1. logon with system and create a user called user1 with password user1...
May 9, 2008 at 6:08 am
Yes it makes sense now. So you are counting the hours.
The days go from 0 to 255 and the hours from 0 to 23 giving 6144 combinations of day/hour values.
For...
May 8, 2008 at 4:39 am
Peso,
I have decided to take a deeper look into your query. It is certainly one if the strangest pieces of code I have seen - and all for the purpose...
May 8, 2008 at 1:53 am
Playing around with Jeff's code a bit, I think I have found the fix. It now returns correct results for Peso's dates and I tried it with thousands of randomly...
May 7, 2008 at 11:59 pm
Finally figured out Jeff's code. It relies a lot on default behavior when using datetime variables in arithmetic statements. In any case, it appears to be compensating for Saturday and/or...
May 7, 2008 at 2:25 pm
Peso,
1. I'm not too sure what your query is trying to accomplish.
2. I responded to daljitphull's question of how to get this sort of thing into a trigger. He will...
May 7, 2008 at 9:03 am
Heh... to be clear, I've never written a cursor except to show how slow they are... :hehe:
Given that Jeff is in luv with cursors, we all really need to be...
May 7, 2008 at 4:47 am
It's pretty straight forward. You should read up on how to create a trigger. Here is a complete example:
-- create a sample table
if exists (select name from dbo.sysobjects where name...
May 7, 2008 at 4:09 am
I think if you use my idea of what Jeff calls a 'Sequence Table' plus what he refers to as a propietary UPDATE, you should be in good shape.
But I...
February 14, 2008 at 1:50 pm
I can confirm that your approach is pretty sound - even if it does not get to the root cause. When I first ran into this problem I had decided...
January 27, 2008 at 8:43 am
I have always wondered what comes after TB. But here you are using the term 27000PB. So what comes after PB so that we can all breath easy and write...
January 15, 2008 at 11:25 pm
Viewing 15 posts - 271 through 285 (of 549 total)