Viewing 15 posts - 1,981 through 1,995 (of 3,011 total)
Just padding my posts here, but I really don't see how answer ratings would contribute much. This is a discussion board, so all the meat is in the discussion....
March 5, 2009 at 8:23 pm
Maybe you could run the backup set query that was posted above and know for sure.
March 4, 2009 at 10:59 pm
You have changed the requirements of what you want with each post.
You should start by thinking through what you actually want, and then asking that question, instead of asking 4...
March 4, 2009 at 10:54 pm
Mr J (3/4/2009)...I've just found out that views can not contain aggregates functions or Group by ...
That is not true; they can have both.
March 4, 2009 at 10:24 pm
You can look at the logic inside the Date Table Function F_TABLE_DATE to see how it does it, since it generates the dates at run time.
March 4, 2009 at 10:15 pm
You could use a function to generate the dates for the range you need, or you could pre-populate a permanant table with the dates you need, and select the range...
March 4, 2009 at 9:56 pm
john.arnott (3/4/2009)
You've given an interesting solution that apparently depends in several ways on internals of MSSQL. Your -1 operand in the datediff could have been the slightly less obscure...
March 4, 2009 at 4:56 pm
Chris Morris (3/4/2009)
Michael Valentine Jones (3/3/2009)
The code you posted doesn't work, unless you happen to have a table named Numbers in the current database.
March 4, 2009 at 4:38 pm
You are adding 10,000,000 rows a day, about 116 rows per second, so to keep up you will have to be able to delete at at least that rate.
You should...
March 3, 2009 at 9:05 pm
Chris Morris (3/3/2009)
DROP TABLE #Dates
CREATE TABLE #Dates (aDate DATETIME)
INSERT INTO #Dates
SELECT TOP 100 DATEADD(dd,DATEDIFF(dd, 0, getdate()),50-number)
FROM Numbers
SELECT aDate, SergiyStart,...
March 3, 2009 at 4:12 pm
It would be better to run the deletes just before you do the daily defrag and statistics update.
If it only takes a 30 seconds to delete each batch of 5000,...
March 3, 2009 at 12:25 pm
Did you look that up in SQL Server 2008 Books Online to confirm that statement it is true?
Did you do any testing to confirm this?
March 3, 2009 at 10:14 am
Lynn Pettis (3/3/2009)
declare @pDate datetime;
set @pDate = getdate();
select
dateadd(wk, datediff(wk, 0, @pDate - 1), 0)...
March 3, 2009 at 9:58 am
karthikeyan (3/3/2009)
Declare @InputDate Datetime
select @InputDate = '28/feb/2009'
select case when upper(datename(dw,@InputDate)) = 'MONDAY' then @InputDate
...
March 3, 2009 at 8:38 am
GilaMonster (3/2/2009)
1) http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=1207362) http://www.sqlservercentral.com/Forums/Topic666657-266-1.aspx
Why do people have no backups, no regular backups, no offsite backups, etc, etc.
Hard to imagine why, but it seems to be common enough.
It's dead, Jim
March 2, 2009 at 1:45 pm
Viewing 15 posts - 1,981 through 1,995 (of 3,011 total)