Forum Replies Created

Viewing 7 posts - 16 through 22 (of 22 total)

  • RE: Generating Missing Dates and Numbers

    Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790:...

  • RE: Generating Missing Dates and Numbers

    What are CTEs?

    How can I check the version I'm using?

    What I get from SQLSERVER2005 console is:

    Microsoft SQL Server Management Studio 9.00.3042.00

    Herramientas cliente de Microsoft Analysis Services 2005.090.3042.00

    Microsoft Data Access Components...

  • RE: Generating Missing Dates and Numbers

    The instruction:

    Select datediff(dd, '20070101','20071231')+1

    correctly returns 365.

    It looks like if it didn't accept nested functions, but that's obliously not true... so I really don't know...

  • RE: Generating Missing Dates and Numbers

    The error message is:

    Mens. 102, Nivel 15, Estado 1, Línea 3

    Sintaxis incorrecta cerca de 'datediff'.

    Translating to English it sounds:

    Message 102, Level...

  • RE: Generating Missing Dates and Numbers

    it's your code which gives me sintax error:

    ;WITH T1 AS

    ( SELECT CAST('2007-01-01' AS DATETIME) + Number - 1 as MYDATE

    FROM dbo.GetNumbers(1, datediff(dd, '20070101','20071231')+1)

    )

    SELECT * from T1

    The version i'm using...

  • RE: Generating Missing Dates and Numbers

    hello Jeff

    thanks a lot for your reply.

    (FYI, I normally don't use literals. I put literals only to make my sentence more readable fro the blog. And sorry about the inverted...

  • RE: Generating Missing Dates and Numbers

    -- ¿Can anybody explain why the following sentence returns an error?Thanks

    WITH T1 AS

    ( SELECT CAST('2007-01-01' AS DATETIME) + Number - 1 ...

Viewing 7 posts - 16 through 22 (of 22 total)