Forum Replies Created

Viewing 15 posts - 18,331 through 18,345 (of 26,484 total)

  • RE: T-SQL

    Okay, nope, it is called twice. Once for each column. Changed the Tally version to generate 100,000 records. Guess what, Date1 was the same for every row...

  • RE: T-SQL

    Okay, I think I have my answer. In the first query, using the Tally table to generate a batch of 10,000 entries, the scalar function IS called once. ...

  • RE: T-SQL

    Back to the code posted earlier. Anyone have an explanation as to why one may generate a small number of values that are differnet and the other doesn't?

    I guess...

  • RE: T-SQL

    Tom Garth (11/17/2009)


    Lynn Pettis (11/17/2009)


    This:

    (something funky here at work, I had to remove the DECLARE and PRINT statements to get this post to post)

    I agree. I clicked 'Quote' a couple...

  • RE: T-SQL

    Okay, I have just run some more tests.

    If I generate the test values using GO 10000 to load a table I can get it to fail about 9 times out...

  • RE: T-SQL

    Well then, parallelism must be working on my system here because I have run this 10,000 times and don't have a discrepancy between them. System here has dual quad...

  • RE: T-SQL

    This:

    WHILE 1 = 1

    BEGIN

    IF GETDATE() = GETDATE() BEGIN

    ...

  • RE: T-SQL

    Tom Garth (11/17/2009)


    As it happens, SQL Server does not recognize GetDate() and GetUtcDate() as being equal.

    Take a look at this:

    ...

    Your correct GETDATE() <> GETUTCDATE(), but GETDATE() and GETUTCDATE() can represent...

  • RE: T-SQL

    Because, I can also write the queries like this:

    SELECT

    DATEADD(day, -1, GETDATE()),DATENAME (dw ,DATEADD(day, -1, GETDATE()) ),

    GETDATE() - 1, DATENAME (dw ,GETDATE() -...

  • RE: T-SQL

    I really missed something else, but learned something as well just now.

    1) Multiple calls to getdate() in the same query will return the same value.

    2) Multiple calls to getutcdate() in...

  • RE: T-SQL

    I GOT it!

    The query should have been written like this instead of as four separate queries:

    SELECT

    DATEADD(day, -1, GETDATE()),DATENAME (dw ,DATEADD(day, -1, GETDATE()) ),

    ...

  • RE: T-SQL

    david.wright-948385 (11/17/2009)


    Lynn Pettis (11/17/2009)


    Dietmar Weickert (11/17/2009)


    ... finally trying to argue that the whole thing were for educational purposes is even more cynical. I hope nobody ever had or will have...

  • RE: Creating tables within a schema

    Don't know. Can you post the DDL you used to create the schemas?

  • RE: SSIS problem

    English please?

  • RE: execute sql task is not working

    Your problem is you are trying to pass the name of a table as a paramater, or as a variable. You can't use a variable in the FROM clause....

Viewing 15 posts - 18,331 through 18,345 (of 26,484 total)