Forum Replies Created

Viewing 15 posts - 5,581 through 5,595 (of 7,597 total)

  • RE: Baffling query plan on slow query

    Robert Frasca (12/2/2014)


    Grant Fritchey (12/2/2014)


    ScottPletcher (12/2/2014)


    Robert Frasca (12/2/2014)


    ScottPletcher (12/2/2014)


    Robert Frasca (12/2/2014)


    ScottPletcher (12/1/2014)


    I guess the SourceFactTimeCard table is fairly wide?

    I suggest creating a covering index on:

    SourceFactTimeCard (...

  • RE: Baffling query plan on slow query

    Robert Frasca (12/2/2014)


    ScottPletcher (12/2/2014)


    Robert Frasca (12/2/2014)


    ScottPletcher (12/1/2014)


    I guess the SourceFactTimeCard table is fairly wide?

    I suggest creating a covering index on:

    SourceFactTimeCard ( TimecardIndex, EmployeeID )

    If SQL then...

  • RE: SQL DBA knowing user passwords

    eric.notheisen (12/2/2014)


    In our company sharing user passwords is a firing offense. As developers needing to troubleshoot user defined defects, we restore the production database to our development VM's and...

  • RE: Baffling query plan on slow query

    Robert Frasca (12/2/2014)


    ScottPletcher (12/1/2014)


    I guess the SourceFactTimeCard table is fairly wide?

    I suggest creating a covering index on:

    SourceFactTimeCard ( TimecardIndex, EmployeeID )

    If SQL then uses that covering...

  • RE: Auto Memory control

    SQL allows you to designate a proc(s) as "start up" procs that automatically runs when an instance starts. I was suggesting you create such a proc, or add code...

  • RE: Baffling query plan on slow query

    I guess the SourceFactTimeCard table is fairly wide?

    I suggest creating a covering index on:

    SourceFactTimeCard ( TimecardIndex, EmployeeID )

    If SQL then uses that covering index -- it...

  • RE: Last 30 days aggregate query

    SELECT CONVERT(varchar(10), DATEADD(DAY, DATEDIFF(DAY, 0, dt), 0), 120) AS dt, SUM(amt) AS Amt

    FROM @t

    GROUP BY DATEADD(DAY, DATEDIFF(DAY, 0, dt), 0)

  • RE: Proper use of CTE in scalar valued function

    You can pass @StartingDate as a param to the ITV function.

    Also, you can simplify the calc for PastPeriods:

    MONTH(@StartingDate) % 3 + 14

  • RE: Auto Memory control

    You'll need to create a start up proc for each instance that checks for the different conditions.

    Since you have to change both instance's memory settings, I'd create a proc in...

  • RE: Alter the schema from one view causes the need to alter the other

    ZZartin (12/1/2014)


    ScottPletcher (12/1/2014)


    GilaMonster (11/30/2014)


    river1 (11/28/2014)


    What do you mean by stop using select?

    I didn't say stop using select. I said stop using SELECT *. Explicitly define what columns you need and...

  • RE: Alter the schema from one view causes the need to alter the other

    GilaMonster (11/30/2014)


    river1 (11/28/2014)


    What do you mean by stop using select?

    I didn't say stop using select. I said stop using SELECT *. Explicitly define what columns you need and you won't...

  • RE: How to free up the drive space in SQL that has data files

    Also, as additional stop-gap measures:

    1) review indexes to see if there any you can drop

    2) if you have any heaps, see if they consume a lot of space beyond what...

  • RE: tempDB queries

    zedtec (11/25/2014)


    I've also noticed when I go into my tempDB database properties through SSMS I get the following error:

    ERROR 1222 : Lock request time out period exceeded.

    I killed a session...

  • RE: Find Values Like Field Values

    In theory, the code below would do what you've described.

    select t2.*

    from Table2 t2

    where

    exists(select 1 from table1 t1 where t2.detail like '%' + t1.ID +...

  • RE: tsql with out using cursors

    ZZartin (11/21/2014)


    g.britton (11/21/2014)


    ScottPletcher (11/21/2014)


    You don't "have" to do the FETCH twice. In fact, I never do that, because it's too error prone when the code is changed.

    good point, though...

Viewing 15 posts - 5,581 through 5,595 (of 7,597 total)