Forum Replies Created

Viewing 15 posts - 166 through 180 (of 252 total)

  • RE: Weird "Group By" Behavior from Subquery with Derived Table

    Here is another batch that includes the buggy result.  In the last query, the output has the same number of records as in #temp (776937) rather than 1.  This is...

  • RE: Weird "Group By" Behavior from Subquery with Derived Table

    ...and thanks for the tip.  These queries are fast enough that comparing relative times in one batch via the execution plan window is nice. 

  • RE: Weird "Group By" Behavior from Subquery with Derived Table

    -- Query 1: Query Cost (relative to batch): 48.89%

    SELECT c.defendant_sid,

        count(*) as [count],

        CAST(MIN(c.calendar_time) as char(20)) as [MIN(calendar_time)],

        (   SELECT CAST(MIN(t.calendar_time) as char(20))

            FROM #temp t

           ...

  • RE: Weird "Group By" Behavior from Subquery with Derived Table

    Here it is one more time - my post gets lost from time to time....

    The developer simplified the problem by removing the derived table.  I think this is the best...

  • RE: Weird "Group By" Behavior from Subquery with Derived Table

    StmtText                                                                                                                                                                                                                                                                                                                                                                       

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    SELECT c.defendant_sid,

        count(*) as [count],

        CAST(MIN(c.calendar_time) as char(20)) as [MIN(calendar_time)],

        (   SELECT CAST(MIN(t.calendar_time) as char(20))

            FROM #temp t

            WHERE t.defendant_sid = c.defendant_sid

            ) as...

  • RE: Weird "Group By" Behavior from Subquery with Derived Table

    I took a look at the execution plans for the example code included above.  They both use parallelism, but the second one (with the problem) is more complicated and has...

  • RE: Weird "Group By" Behavior from Subquery with Derived Table

    I think I'll skip the derived table.  I can never tell what I'm going to get from the developers .  The original query...

  • RE: Log Restore Failing

    See Q295371: PRB: Filegroup Log Restore May Fail with Error Message 4305

    Error Messages

    SQL Server 2000

    Server: Msg 4305, Level 16, State 1, Line 2

    The log in this backup set begins at...

  • RE: Query Returns Data From Linked Server Despite Loss of Connection?

    It's good to use cached data, but only if it's not stale.  It would be interesting to select from a table with a computed column based on GetDate().  The cached...

  • RE: Query Returns Data From Linked Server Despite Loss of Connection?

    Are you sure the connection is failing from QA?  Stress related TCP/IP socket issues, for example, are typically sporadic - Q328476.  Otherwise, perhaps DBCC FREEPROCCACHE might force it to refresh. ...

  • RE: Move DTS Packages to a Remote Server

    quote:


    Look for the line

    goPackage.SaveToSQLServer

    in the VB file. Check Books Online for the full syntax. Be aware that you'll...

  • RE: Move DTS Packages to a Remote Server

    The second to last menu item in the "Package" menu is "Disconnect Edit...". It lets you edit various properties of connections, tasks, and work flow. I sometimes use...

  • RE: QOD 12/17/03

    I didn't get a second chance.

  • RE: QOD 12/17/03

    I did answer the first question correctly, but not the second. I assumed that the email would have the same question as the question in the link. Guess...

  • RE: Catching error from trigger in a stored procedure

    As a test, I would try a RAISERROR('trigger', 16, 1) in the trigger and catch the error after the query directly invoking the trigger. Perhaps your error is not...

Viewing 15 posts - 166 through 180 (of 252 total)