Forum Replies Created

Viewing 15 posts - 3,661 through 3,675 (of 7,614 total)

  • RE: Query Help -

    Ed Wagner - Monday, December 4, 2017 3:44 PM

    ScottPletcher - Monday, December 4, 2017 3:36 PM

    December 4, 2017 at 3:46 pm

    #1970632

  • RE: Query Help -

    Ed Wagner - Monday, December 4, 2017 3:33 PM

    ScottPletcher - Monday, December 4, 2017 12:59 PM

    December 4, 2017 at 3:36 pm

    #1970628

  • RE: Query Help -

    I allow my instances to auto-parameterize, so if it's that valuable to the plan, presumably SQL will do so anyway.

    Again, with dynamic SQL specifically -- which this code...

  • RE: Query Help -

    Lynn Pettis - Monday, December 4, 2017 1:22 PM

    ScottPletcher - Monday, December 4, 2017 12:59 PM

    December 4, 2017 at 2:19 pm

    #1970614

  • RE: Query Help -

    Ed Wagner - Monday, December 4, 2017 12:11 PM

    Lynn Pettis - Monday, December 4, 2017 11:44 AM

  • RE: Query Help -

    Lynn Pettis - Monday, December 4, 2017 11:11 AM

    ScottPletcher - Monday, December 4, 2017 10:10 AM

    December 4, 2017 at 11:35 am

    #1970580

  • RE: Query Help -

    Thom A - Monday, December 4, 2017 10:02 AM

    ScottPletcher - Monday, December 4, 2017 9:53 AM

    December 4, 2017 at 10:10 am

    #1970562

  • RE: Query Help -

    I think you'll have to use dynamic SQL.  Btw, it'd be better to combine into a single table clustered on date and just specify date as part of the WHERE.

  • RE: db_denydatawriter and db_datareader roles

    You could try adding db_denydatawriter to the "guest" user.  Not sure it would work, but it should be worth a try.

  • RE: Calendar table to transaction table join performance

    It can't hurt to apply the limiting condition to both tables:

    WHERE a.TransactionTime >= @startdate
    and b.DateKey >= @startdate
    and ...

    Maybe since the DateKey is datetime, we should...

  • RE: Query Optimization Advice

    Are you willing to try changing the Clustering on table FctCoverageLengthDetail as I suggested earlier?  I'm just curious as to how much it would help.

  • RE: Query Optimization Advice

    Clustering table  FctCoverageLengthDetail on ( EnrollmentID, CoverageID ) might help, although by how much I can't tell, as the query is obviously very complex.

    If you try that, then if...

  • RE: Add Column to Staging table

    SQL must parse the code before it runs.  At parse time, the column "RowNr" indeed does not exist because the code that adds the column to the table hasn't run...

  • RE: Subquery vs join

    You might be able to use the fact that the queries could produce different results as a cudgel to get your co-worker to stop writing his queries that way and...

  • RE: Choosing the Birthday of a Customer by month?

    Lynn Pettis - Tuesday, November 28, 2017 11:07 AM

    ScottPletcher - Tuesday, November 28, 2017 11:02 AM

    November 28, 2017 at 11:40 am

    #1969778

Viewing 15 posts - 3,661 through 3,675 (of 7,614 total)