Viewing 15 posts - 1,336 through 1,350 (of 2,007 total)
dhanalakshmi 99938 (11/18/2011)
I want to join 2 tables with date. I want to compare only the dates. That is excluding hours, minutes, seconds, milliseconds
one table contains a date column with...
November 18, 2011 at 5:04 am
UnicornsRreal (11/18/2011)
Trying to get the below query to work and having a little trouble, Basically if you run it as is, it will return the results of the current DB...
November 18, 2011 at 4:48 am
dva2007 (11/18/2011)
November 18, 2011 at 4:37 am
waxingsatirical (11/18/2011)
looks like it is a bug, although according to microsoft it was fixed in SP2 not SP1, so I don't know why you are not getting it...
November 18, 2011 at 4:17 am
Cadavre (11/18/2011)
Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64)Jun 17 2011 00:54:03
Copyright (c) Microsoft Corporation
Developer Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)...
November 18, 2011 at 4:11 am
waxingsatirical (11/18/2011)
I think filtered indexes must be my favourite feature of SQL server, am trying to a use a covering filtered index to speed up my querying when I...
November 18, 2011 at 3:50 am
This is the sort of thing you want: -
--First, lets create some sample data to play with
IF object_id('tempdb..#testEnvironment') IS NOT NULL
BEGIN
DROP TABLE #testEnvironment
END
CREATE TABLE #testEnvironment
(ID INT IDENTITY PRIMARY KEY,
TestNumber INT...
November 18, 2011 at 2:55 am
drew.allen (11/17/2011)
Cadavre (11/17/2011)
PRINT '========== Alternative=========='
SELECT @Holder = randomDate + randomTime
FROM #testEnvironment
PRINT '========== Alternative 2=========='
SELECT @Holder = DATEADD(SECOND, DATEDIFF(SECOND, 0, randomTime), randomDate)
FROM #testEnvironment
PRINT '========== Alternative 3=========='
SELECT @Holder = DATEADD(d, DATEDIFF(d, randomTime,...
November 17, 2011 at 8:22 am
p-nut (11/17/2011)
November 17, 2011 at 8:12 am
p-nut (11/17/2011)
November 17, 2011 at 7:54 am
dva2007 (11/17/2011)
thats perfect way of testing the alternative code. thanks a lot.
No problem. What did you pick in the end?
drew.allen (11/17/2011)
November 17, 2011 at 7:40 am
It would've probably been quicker to enter that error into Google than it was to ask here.
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Ad Hoc Distributed Queries', 1;
GO
RECONFIGURE;
GO
November 17, 2011 at 5:43 am
I don't understand how you're working out your "Peak". Explain that part and I'll edit the script. Also, I think you've missed out the 3 records that bleed...
November 17, 2011 at 5:29 am
Last one big test.
USE [Test]
SET NOCOUNT ON
PRINT '========== Ensure Table is ready =========='
IF object_id('[Test].dbo.testEnvironment') IS NOT NULL
BEGIN
DROP TABLE [Test].dbo.testEnvironment
END
PRINT REPLICATE('=',80)
PRINT '========== Insert 500,000,000(!!) rows =========='
SELECT...
November 17, 2011 at 4:36 am
dva2007 (11/17/2011)
create table #temp
(date1 datetime, date2 datetime)
insert into #temp
select '2011-10-01 00:00:00.000', '1900-01-01...
November 17, 2011 at 4:34 am
Viewing 15 posts - 1,336 through 1,350 (of 2,007 total)