Forum Replies Created

Viewing 15 posts - 7,456 through 7,470 (of 7,483 total)

  • RE: There Must Be 15 Ways To Lose Your Cursors… Part 2: Just Put It in a S

    Bruce W Cassidy (4/30/2009)


    [font="Verdana"]This is another "Look Ma! No cursor!" approach. Of the two, I would rather take the cursor (actually, just a loop, no cursor). Then I...

    Tom

  • RE: There Must Be 15 Ways To Lose Your Cursors… Part 2: Just Put It in a S

    Samuel Vella (4/27/2009)


    Jeff Moden (4/27/2009)


    Heh... in SQL Server 2005, even that can be done without a cursor. We're just gonna have to wait for it in Barry's series of...

    Tom

  • RE: There Must Be 15 Ways To Lose Your Cursors… Part 2: Just Put It in a S

    jwheeler (4/27/2009)


    Then surely the manager hasn't done their job by employing the wrong tool for the task?

    If you have database development to be done you either employ a db...

    Tom

  • RE: There Must Be 15 Ways To Lose Your Cursors... part 1, Introduction

    WayneS (4/18/2009)


    I just thought of something that I wish I had included with my original post.

    Programming languages have evolved. 15 years ago, you had plain old programming languages, complete with...

    Tom

  • RE: There Must Be 15 Ways To Lose Your Cursors... part 1, Introduction

    RBarryYoung (4/15/2009)


    Just because pure set-based SQL may not be sufficient for a particular task does not mean that that justifies Cursors or loops in SQL. There are still a...

    Tom

  • RE: There Must Be 15 Ways To Lose Your Cursors... part 1, Introduction

    Girish Bhat (4/15/2009)


    Hi Thomas,

    Your point is well taken. For the specific example you have mentioned, you could use:

    sp_MSforeachtable

    @command1 = "Alter Table ? Alter Column...

    Tom

  • RE: There Must Be 15 Ways To Lose Your Cursors... part 1, Introduction

    dbishop (4/14/2009)


    That is the point I was making. The author assumed that by changing his code from the individual steps (procedures) to Cookies, with chocolate chips, all of a sudden...

    Tom

  • RE: There Must Be 15 Ways To Lose Your Cursors... part 1, Introduction

    gautamsheth2000 (4/13/2009)


    Should use this code 🙂

    Select count(*) From master.sys.columns C1 CROSS JOIN master.sys.columns C2

    That's far too slow 😉

    Try instead:

    select power(count(*),2) from master.sys.columns

    Comparing equivalent code on SQL Server 2000 indicates...

    Tom

  • RE: TOP

    There's something I disagree with in this paragraph: "Note that this works in the current version of the optimizer, but it is subject to change. DO NOT use TOP...

    Tom

  • RE: Transactions

    dmoldovan (3/20/2009)


    kevin.l.williams (3/20/2009)


    I am not sure but I think that since there is no index or key defined on the table the select statement will cause a table scan and...

    Tom

  • RE: Transactions

    Chris Harshman (3/19/2009)


    Ben Leighton (3/19/2009)


    this question is flawed...

    if the SET READ_COMMITTED_SNAPSHOT is set to on for the database you are using then the query will return 1 and 2...

    I'm...

    Tom

  • RE: Being More Productive

    I guess what's improved my efficiency is remote access technology: the internet,VPNs ,VPDNs, remote desktop. VOIP. Without some of these I would have real problems with systems on...

    Tom

  • RE: Pruning

    I'm very much in the clean up camp. I have an inviolable rule that the only access applications have to the databases is to stored procedures, so that I don't...

    Tom

  • RE: SQL 2008 Indexes

    noeld (2/3/2009)


    Actually I have had the need for this feature for a long time.

    Suppose you need to prevent changes on ONE table while you are doing some maintenance work...

    Tom

  • RE: Object Names

    Somewhat incomplete answer: an important part of the sp is the option to raise or not raise an error if the sysname parameter is invalid. (unless that has changed in...

    Tom

Viewing 15 posts - 7,456 through 7,470 (of 7,483 total)