Forum Replies Created

Viewing 15 posts - 1 through 15 (of 49 total)

  • RE: Deadlock

    L' Eomot Inversé (2/9/2012)


    I wonder what SQL Server does about victim selection when all processes involved have the same deadlock priority (which will be most of the time, I imagine).

    It...

  • RE: the conversion of a char data type to a datetime data type resulted in a out-of-range datetime value

    Are you specifying a date in your WHERE clause? If so, then the format you are passing might not match the format for your default language - e.g. if...

  • RE: Multi-statement execution

    Simon Liddle (2/3/2010)


    I thought that the dynamic SQL would execute and the results from the last statement - the delete statement would be inserted.

    ...and that is nonsense the more I...

  • RE: Multi-statement execution

    Interesting question - I guessed 0 rows - I thought that the dynamic SQL would execute and the results from the last statement - the delete statement would be inserted....

  • RE: Multi-statement execution

    Joy Smith San (2/3/2010)


    Wel, Usualy I answer the question by reading it on the screen itself. I never copy and paste it in query analyzer.Had I copied it in query...

  • RE: Rowcount

    sjimmo (1/29/2010)


    Chad - You got me thinking.

    I opened an OSQL session in DOS to a SS2K5 box, and running the code as is got the 0,1 answer.

    BUT - how many...

  • RE: Rowcount

    Not related to the debate about the quality of QotD, but if I try running SELECT @@ROWCOUNT using osql against SQL2000 it returns my SPID! Any idea why?

    (It works...

  • RE: Rowcount

    The question HAS been changed. As well as that, my answer (which was 0,1 previously) is now showing as 1,1 (and is still marked correct)! :w00t:

  • RE: Rowcount

    Irish Flyer (1/29/2010)


    When you open a new query window, an immediate @@ROWCOUNT will always return a 1. This is an incorrect return

    Sorry to split hairs, but I disagree that...

  • RE: Rowcount

    Just to take this one step further from my previous comment about it depending on the client tool....

    If you profile QA as you connect to the server, you will see...

  • RE: Rowcount

    It seems to depend on the client tool, not the server - I tried this with both QA and SSMS against a SQL 2000 server - QA returned 1,0 as...

  • RE: Return single ResultSet from Multiple

    If you need to do this, the following should work:

    DECLARE @table1 TABLE (source VARCHAR(10), criteria VARCHAR(1))

    DECLARE @table2 TABLE (source VARCHAR(10), criteria VARCHAR(1))

    INSERT INTO @table1 (source, criteria) VALUES ('Table1', '1')

    INSERT INTO...

  • RE: How do I Create a Temp table with Incr dates for each day

    Just to take it one step further, the changes to Lutz's code below will bring it to the current date:

    declare @customer table (customerid varchar(8))

    declare @startdate datetime

    declare @maxdate INT

    insert into @customer...

  • RE: BEGIN-END Structure

    Where do @SysObjectTest and @SysObjectTableName come from? If they both come from data in another table, then you may be able to do this using a join rather than...

Viewing 15 posts - 1 through 15 (of 49 total)