Forum Replies Created

Viewing 15 posts - 6,271 through 6,285 (of 8,761 total)

  • RE: Convert Iterative query to set based query

    For completion, here is a SQL Server 2012 and later version using the window functions, roughly 3x faster than the 2005/2008 method

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    declare @temp as table

    (

    ID int identity,

    TS...

  • RE: SSMS

    Maybe it's the absense of the industrial strength espresso in the morning but I'm not certain what the question is, can you please elaborate?

    😎

  • RE: How does teh inserted and deleted created of triggers?

    Further on twin.devil's reply, the cardinality (#) of the two tables indicates the action, if #inserted > 0 and #deleted =0 then "insert", if #inserted > 0 and #deleted >...

  • RE: Convert Iterative query to set based query

    This is relatively easy to do on SQL Server 2012 and later, can you let us know which version you are on? Meanwhile here is a quick set based solution...

  • RE: Help With Trying to Import File Names into a Table

    Jeff Moden (1/17/2015)


    To help wet my appetite for reading that stairway further, would someone please just tell me how to load the previously identified packages so that I might have...

  • RE: Help With Trying to Import File Names into a Table

    Jeff Moden (1/16/2015)


    Samuel Vella (1/16/2015)


    Jeff Moden (1/15/2015)


    No problem. Thank you very much for your efforts.

    I have to admit that when it comes to SSIS, I get totally lost because...

  • RE: Index creation on predicates

    smitty-1088185 (1/16/2015)


    I was reading this blog below about Indexed Views and needed some clarification.

    When the author choose to create the unique clustered index he excluded the PER.BusinessEntityID

    columns and...

  • RE: Please explain what this Trigger query does

    Quick thoughts, this trigger is supposed to copy the data being inserted into the dbo.Employee table into the dbo.EmployeeAudit table, catch error in the insert and roll back the transaction...

  • RE: Rank on repeating groups of bit field

    Jim Shaffer (1/16/2015)


    Lets say I have some data where a bit value changes over time and I want to rank it by the repeating groups, how do I write the...

  • RE: Run NewID() multiple times

    Still further on the subject, here is a table value function spawned by Lynn's function

    😎

    USE tempdb;

    GO

    create view dbo.MyNewID as

    select newid() as NewIDValue;

    go

    CREATE FUNCTION dbo.ITVFN_DO_SHAKESPEARE

    (

    @BATCHSIZE INT...

  • RE: Tipping point for a numbers table vs inline tally

    Jeff Moden (1/16/2015)


    Eirikur Eiriksson (1/16/2015)


    Jeff Moden (1/16/2015)


    sqldriver (1/16/2015)


    You guessed right on the seconds 🙂

    "Lawyers" and their "billable hours"; we should all be so lucky.

    Oh my word! That's bloody well...

  • RE: Run NewID() multiple times

    Stefan Krzywicki (1/16/2015)


    Thanks, but there's a part I'm not sure I get. What's the

    FROM T T1,T T2,T T3,T T4,T T5,T T6,T T7

    for? How does that work?

    The "seed" for the...

  • RE: Run NewID() multiple times

    Further on this, if you want more normal looking text then something like this might help

    😎

    DECLARE @BATCHSIZE INT = 255;

    DECLARE @ROWCOUNT INT = 10000;

    ;WITH T(N) AS (SELECT N FROM...

  • RE: Run NewID() multiple times

    Quick alteration of the code, changed to set based double loop, the trick is to a add variations to the inner loop

    😎

    DECLARE @BATCHSIZE INT = 255;

    DECLARE @ROWCOUNT INT =...

  • RE: Tipping point for a numbers table vs inline tally

    Jeff Moden (1/16/2015)


    sqldriver (1/16/2015)


    You guessed right on the seconds 🙂

    "Lawyers" and their "billable hours"; we should all be so lucky.

    Oh my word! That's bloody well insane. :hehe: Do...

Viewing 15 posts - 6,271 through 6,285 (of 8,761 total)