Viewing 15 posts - 1 through 15 (of 64 total)
Jeff, (or anyone)
Any word on this query?
here's what I have now:
SELECT FirstListing,OnCallStart,OnCallEnd
FROM
(
SELECT
moncallAdd.FirstListing,
DATEADD(MINUTE, mOnCallAdd.StartOnCallTime,
...
September 2, 2011 at 12:05 pm
jeff,
Sorry. Here is the delete data:
--===== If the test table already exists, drop it
IF OBJECT_ID('TempDB..#moncalldelete','U') IS NOT NULL
...
August 29, 2011 at 10:41 am
Jeff,
I've had to modify the query a bit, because now we're using the adddate and addtime to be able to eliminate duplicate data. So here's the query as it stands...
August 25, 2011 at 10:47 am
Sergiy,
Ok so I have this revised query now:
SELECT
moncallAdd.FirstListing,
DATEADD(MINUTE, mOnCallAdd.StartOnCallTime,
DATEADD(DAY, mOnCallAdd.StartOnCallDate,...
August 23, 2011 at 9:32 am
Sergiy,
I did as you suggested, and ran all 3 queries.
Query 1 returned 23 lines of data
Query 2 returned 10 lines of data
Query 3 returned 33 lines of data
Now what I...
August 22, 2011 at 1:57 pm
Jeff,
I've tried that and didn't get back all of the correct results. I did a line by line comparison for running my query with everything after the union statement removed...
August 19, 2011 at 2:36 pm
If I modify my query to be this:
SELECT
moncallAdd.FirstListing,
DATEADD(MINUTE, mOnCallAdd.StartOnCallTime,
DATEADD(DAY, mOnCallAdd.StartOnCallDate, '12/31/1899')) AS OnCallStart,
DATEADD(MINUTE, mOnCallAdd.duration,
DATEADD(MINUTE, mOnCallAdd.StartOnCallTime,
DATEADD(DAY, mOnCallAdd.StartOnCallDate, '12/31/1899'))) AS OnCallEnd,
'Added' AS Activity
FROM
mdr.dbo.mOnCallAdd
WHERE...
August 19, 2011 at 12:49 pm
Jeff,
here's the original query this was built off of:
SELECT
mOnCallAdd.SchedName,
DATEADD(MINUTE, mOnCallAdd.AddTime,
DATEADD(DAY,...
August 19, 2011 at 9:03 am
Table definitions are as follows:
StartDate Int
StartTime Int
Firstlisting nvarchar
duration decimal
adddate int
addtime int
Do you need more than that?
August 18, 2011 at 12:43 pm
Actually ... in going back through my code, I realized I missed something. The time and date for this process is stored in two fields. Start time and start date....
August 12, 2011 at 2:45 pm
I'm not sure what you're saying that >= is there. Are you saying that I'm not seeing something else?
August 12, 2011 at 1:31 pm
Ninja,
I'm aware that <>= are comparative operators. What I was asking is where does your code fit into what I'm asking to do? My code is complete and all I'm...
August 12, 2011 at 12:17 pm
Ninja,
Here's how I have the SP coded now:
SELECT
moncallAdd.FirstListing,
DATEADD(MINUTE, mOnCallAdd.StartOnCallTime,
DATEADD(DAY, mOnCallAdd.StartOnCallDate,...
August 12, 2011 at 8:25 am
Jeff,
Thank you for your response. What I've since discovered is as follows:
My query needs to return values for date/times up to the current time. In other words, say I have...
August 11, 2011 at 3:37 pm
Ninja,
the variable of @sincedate is just declared as datetime. If I run this SP with just the date, then I have no issue, but as Gila stated, if I run...
August 10, 2011 at 1:10 pm
Viewing 15 posts - 1 through 15 (of 64 total)