The Temp Alias

  • Comments posted to this topic are about the item The Temp Alias

  • And you should see what happens when you drop the table! 😀

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • This was removed by the editor as SPAM

  • I wasn't familiar with aliasing a temp table.  How is this useful?  I'm struggling to think of a use case.

  • I struggle with a use case as well. I was honestly surprised this was available as a possibility.

  • You could create a separate stored procedure that accepts a spid as an input parameter.

    The stored proc would be a simple WAITFOR command that waits for a period of time and then kills the spid if that spids connection time is longer than the waitfor time.

    Then all you’d have to do is call that proc in your main procedure, using @@SPID.

  • Jason A. Long wrote:

    You could create a separate stored procedure that accepts a spid as an input parameter. The stored proc would be a simple WAITFOR command that waits for a period of time and then kills the spid if that spids connection time is longer than the waitfor time. Then all you’d have to do is call that proc in your main procedure, using @@SPID.

    Calling a different stored procedure from a main stored procedure isn't an asynchronous event.  How would you make it so it was?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • You are 100% correct Jeff. Complete brain fart on my part. Please disregard my previous comment.

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply