Viewing 15 posts - 41,821 through 41,835 (of 59,102 total)
I ran your code from the previous post... here it is, again...
select getdate()
select dbo.CalcTimeBetweenTwoDates('2004-11-16 15:30', '2007-11-21 07:31')
select getdate()
Here's what I get for an error message from that code...
Msg 4121, Level...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 24, 2009 at 5:51 pm
Thanks for the feedback, Mazharuddin... I'll take a look.
--Jeff Moden
Change is inevitable... Change for the better is not.
September 24, 2009 at 5:41 pm
David Kranes (9/24/2009)
Here is the DDL. Thank you.
There real problem is that the "Active_Address_ID" has no index on it nor is it a part of any other index, yet...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 24, 2009 at 5:19 pm
Almost forgot... if you're just playing with a Tally table, then TempDB is fine. If you want one for a production table, then Hugo is correct there... TempDB is...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 24, 2009 at 5:02 pm
DavidL (9/24/2009)
DECLARE @DateStart DATETIME
DECLARE @DateEnd DATETIME
--===== Find the min and max dates in the range of data
SELECT...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 24, 2009 at 4:59 pm
Hugo Kornelis (9/24/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
September 24, 2009 at 4:57 pm
Hugo Kornelis (9/24/2009)
Based on visual inspection of your code, I fail to see any way that this code could cause "gaps" in the tally table. I think what you...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 24, 2009 at 4:52 pm
Lynn Pettis (9/23/2009)
Also, the DATE data type does make sense in those areas where time is not needed, such as DateHired, DateTerminated. Who cares what the time is there.
Heh......
--Jeff Moden
Change is inevitable... Change for the better is not.
September 24, 2009 at 2:34 pm
DavidL (9/24/2009)
--===== Presets
DECLARE @DateStart DATETIME
DECLARE @DateEnd DATETIME
SELECT @DateStart = '2008-01-01 06:00',
...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 24, 2009 at 2:25 pm
I also need to know how many rows you actually have in your Tally table, please.
--Jeff Moden
Change is inevitable... Change for the better is not.
September 24, 2009 at 2:19 pm
DECLARE @DateStart DATETIME
DECLARE @DateEnd DATETIME
--===== Find the min and max dates in the range of data
SELECT @DateStart = MIN(SalesDate),
@DateEnd...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 24, 2009 at 2:18 pm
Gosta Munktell (9/23/2009)Quick and dirty?
Heh... very... it's quite easy to do exactly the same thing in T-SQL.
--Jeff Moden
Change is inevitable... Change for the better is not.
September 23, 2009 at 4:14 pm
David Kranes (9/23/2009)
Sorry for the delay in providing this. I have attached the DDL.
Where? Not on that post...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 23, 2009 at 4:11 pm
amos-870870 (9/23/2009)They split the time the way they did I believe because it was the straight forward way to accomplish what they wanted to do with their front end application....
--Jeff Moden
Change is inevitable... Change for the better is not.
September 23, 2009 at 4:10 pm
RBarryYoung (9/23/2009)
Great article, Lynn! I might finally be ready to stop cross-joining master..syscolumns. 🙂
I already quit... heh... I use Master.sys.All_Columns now. 😛
--Jeff Moden
Change is inevitable... Change for the better is not.
September 23, 2009 at 4:02 pm
Viewing 15 posts - 41,821 through 41,835 (of 59,102 total)