Viewing 15 posts - 1,306 through 1,320 (of 3,011 total)
In this example, I group by the first day of the month, order by that value, and extract year and month from that value.
select
[Year]= year(dateadd(mm,datediff(mm,0,Mydate),0)),
MonthName= datename(month,dateadd(mm,datediff(mm,0,Mydate),0)),
[RowCount]= count(*)
from
( -- Random Test...
July 26, 2010 at 4:57 pm
I became a DBA when I was older than you, and I'm somehow managing to get by.
There are projects that are so mismanaged that they become a death march that...
July 26, 2010 at 4:37 pm
524,258 terabytes
Let us know if that limit becomes a problem.
July 26, 2010 at 12:03 pm
It would by handy if SQL Server had an enhanced IsNumeric function that you could pass a specific target data type to, but that's the way it is for now.
July 26, 2010 at 10:42 am
Are you asking for help optimizing code you did not post?
July 23, 2010 at 2:53 pm
The first condition will allow use of an index on the Date_Column, and the second will compare the combined date and time columns to 24 hours before current time for...
July 22, 2010 at 3:00 pm
Joe Celko (7/22/2010)
brian.cook (7/22/2010)
Thanks, I knew it would be something simple!
Actually, using the proprietary MONEY is a huge problem. It does not divide or multiply correctly. It does...
July 22, 2010 at 1:20 pm
Adam Haines (7/21/2010)
DECLARE @t TABLE(
col VARCHAR(10)
);
INSERT INTO @t VALUES ('13abc');
INSERT INTO @t VALUES ('1abcde');
SELECT *
FROM @t
where col...
July 21, 2010 at 12:09 pm
TravisDBA (7/21/2010)
Steve Jones - Editor (7/21/2010)
Until Red Gate, I had always worked at "at will" employment places. Still didn't prevent HR from being scared to terminate people.
Really? I find that...
July 21, 2010 at 12:05 pm
PaulB-TheOneAndOnly (7/20/2010)
Michael Valentine Jones (7/20/2010)
Wouldn't this be a simpler calculation?
COST = [Total Pageviews] * 0.000005
Yes indeed but - always a "but" huh? - the other "more complex" way is...
July 20, 2010 at 3:37 pm
Vaghasiya Nilesh (7/19/2010)
and one more thing my week is strat from saturday to friday
and im enter today's date that giving me output will be like this:
(dd/mm/yyyy)
10/7/2010 -...
July 20, 2010 at 3:28 pm
Wouldn't this be a simpler calculation?
COST = [Total Pageviews] * 0.000005
July 20, 2010 at 3:19 pm
Sounds like no one read his follow-up post on the blog:
"...However, in this case we had been on a couple calls with EMC about this and even had their top...
July 20, 2010 at 8:27 am
select
a.DT,
Date_Only = dateadd(dd,datediff(dd,0,a.DT),0),
Time_Only = a.DT-dateadd(dd,datediff(dd,0,a.DT),0)
from
( -- Test Data
select DT = convert(datetime,'1753-01-01 00:00:00.003')
union all
select DT = convert(datetime,'1753-01-01 07:21:09.997')
union all
select DT = convert(datetime,'1753-01-01 23:59:59.997')
union all
select DT = getdate()
union all
select DT =...
July 19, 2010 at 3:36 pm
If you have another server available that is running a 32-bit OS, you could schedule jobs that require 32-bit ODBC drivers to run on that server.
July 15, 2010 at 2:02 pm
Viewing 15 posts - 1,306 through 1,320 (of 3,011 total)