Forum Replies Created

Viewing 15 posts - 1,336 through 1,350 (of 2,007 total)

  • RE: compare date columns

    dhanalakshmi 99938 (11/18/2011)


    hi,

    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...

  • RE: Getting Table and Schema Details for Indexes.. DB_ID issue

    UnicornsRreal (11/18/2011)


    Hi

    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...

  • RE: delete duplicate record

    dva2007 (11/18/2011)


    one of the way to delete duplicate record is on sql authority website. I've used it many times but when i looked at the performance of the query it...

  • RE: Bug in unique filtered index

    waxingsatirical (11/18/2011)


    Just found this

    http://connect.microsoft.com/SQLServer/feedback/details/462042/incorrect-duplicate-key-error-with-unique-filtered-index

    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...

  • RE: Bug in unique filtered index

    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)...

  • RE: Bug in unique filtered index

    waxingsatirical (11/18/2011)


    Hi All,

    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...

  • RE: Pivoting Results

    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...

  • RE: concate date and time field

    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,...

  • RE: Insertion order - GETDATE(), IDENTITY_INSERT, and others...

    p-nut (11/17/2011)


    This is true in 1 connection, but what about other servers executing the same query against the same database? To complicate this even more this even more, what about...

  • RE: Insertion order - GETDATE(), IDENTITY_INSERT, and others...

    p-nut (11/17/2011)


    In another thread we were discussing determining the order of insertion. This brought some questions to mind for me. I guess the main question is this; is is...

  • RE: concate date and time field

    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)


    It has been repeatedly shown that manipulating dates by converting...

  • RE: Unable to import from an excel into a Temp table

    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

  • RE: Fetchinh the Total Count based on the Date Time

    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...

  • RE: Searching smallest unused number

    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...

  • RE: concate date and time field

    dva2007 (11/17/2011)


    is this the best way to concate the date and time field in terms of performance of the query?

    create table #temp

    (date1 datetime, date2 datetime)

    insert into #temp

    select '2011-10-01 00:00:00.000', '1900-01-01...

Viewing 15 posts - 1,336 through 1,350 (of 2,007 total)