Forum Replies Created

Viewing 15 posts - 3,766 through 3,780 (of 5,685 total)

  • RE: Are the posted questions getting worse?

    GilaMonster (3/9/2011)


    *sigh* I know I'm a little short tempered due to lingering jetlag (first time I've still been struggling to sleep 3 days later), but I really didn't need three...

  • RE: Non-Clustered Indexes - Need some advice

    Captain Proc, they've hit us in the injectors...

    (In my best William Shatner:)

    "DYYYYYYYyyyyyynaaaaaamiiiiiicc!!!!!"

  • RE: Trigger Performance

    Khades (3/8/2011)


    Doesn't a trigger have the same performance of a Stored Procedure though?

    Coded properly, yes. I find it to be a hidden process, however, and I'd have to look...

  • RE: SP_LOCK Result help

    Bryan.avergonzado (3/8/2011)


    Thank you so much for replying. I'm sorry but like I said I'm a DBA Newbie. Kind of thrown in the fire by my company who went from a...

  • RE: Delete trigger to catch every row

    Well, you can work with all the deleted records at once in a trigger, and you should. Can you post your trigger code? Maybe we can help you...

  • RE: SP_LOCK Result help

    Hey Bryan, welcome to SSC.

    First, your immediate question... the only thing of interest in what you posted is this, and there's no way we will have any idea if applicable...

  • RE: Common table exp

    CTE's are only good for the immediately following statement, which in this case is the SELECT for the @loaddate.

    Might I recommend a view in this case?

  • RE: Trigger Performance

    Khades (3/8/2011)


    I need to insert rows into the table I am referrencing too within the same package.

    I need to insert rows into error table. Error table has an identity column...

  • RE: Non-Clustered Indexes - Need some advice

    LOL, he loves you forever? 😉 Or am I expecting a few bodies?

    Btw, this: (SELECT Max(DTStart) AS DTStart FROM Batch WHERE TreaterID = B.TreaterID)

    I would recommend dropping to...

  • RE: Primary Key fields as an Included Columns in a Composite Index

    GilaMonster (3/8/2011)


    I recommend explicitly adding the clustered key column if it is needed. One for clarity, so that you don't have to look at two indexes to see if the...

  • RE: Date compare

    kd11 (3/8/2011)


    The logic work but I had to change "-30" to "-60" to get within the last 30 days, I wondere why?

    :blink:

    CloseDate between GETDATE() -30 and GETDATE() should get...

  • RE: Is the SQL shorthand notation for equi-joins, by way of the USING construct deprecated?

    Jim Rathmann (3/8/2011)


    Sure here is an example you could tweak to work in your case:

    SELECT *

    FROM employee INNER JOIN department

    ...

  • RE: Time difference between multiple rows

    kadeshara (3/8/2011)


    Thanks Craig,

    I've hardly had any experience with CTE's before but I am learning thanks to helpful people like yourself and few good examples/articles on the internet. Thanks for pointing...

  • RE: Practical Use for FULL OUTER JOIN & CROSS JOIN

    Check the link in my sig under 'Tally Tables' for a good use of Cross Joins.

    All of the 'odd' joins have their places, just should be used rarely and with...

  • RE: Time difference between multiple rows

    Note, when you changed the grouping, you didn't change all of it:

    , MaxClose AS

    (SELECT JobNumber, JobSubject, MAX( JobClose) AS MaxClose

    FROM #MyTable

    GROUP BY JobNumber, JobSubject

    )

    and change this:

    ...

Viewing 15 posts - 3,766 through 3,780 (of 5,685 total)