Forum Replies Created

Viewing 15 posts - 781 through 795 (of 3,348 total)

  • RE: Using Parameters in a Query is Killing Performance

    Loner (2/19/2016)


    this table is created by the software company so I can't change anything.

    That's really a shame, because there are some indexes that are completely obsolete and do nothing except...

  • RE: Using Parameters in a Query is Killing Performance

    Loner (2/19/2016)


    It is not I don't want to provide the information, but I can't post my company info on the website. I am trying to provide the info with a...

  • RE: Can Pivot query do

    Would this be what you are looking for?

    SELECT o.OrderId,

    MAX(CASE WHEN od.Category = 'CATE-1'...

  • RE: order of execution problem

    I suggest that you set up a trace/extended events session, or add a (temporary) trigger to the table to track deletes (but note that a trigger will not catch TRUNCATE...

  • RE: Can Pivot query do

    You can probably do this by not using PIVOT but some other pivoting technique,

    Please post the tables and sample data as CREATE TABLE and INSERT statements, so that I can...

  • RE: Creating Filtered Index with OR Statement

    What Gail says. Filtered indexes only allow AND and IN. OR is not allowed. Neither is NOT, which would otherwise have been a nice workaround.

    An OR list of distinct values...

  • RE: Optimize Store Procedure

    djacobos (2/18/2016)


    Anyhow, as I insert data into the Snapshots tables, the tables keep growing and growing

    Yes, that's what happens when you insert data in a table. You should also delete...

  • RE: order of execution problem

    Seggerman-675349 (2/18/2016)


    it goes something like this:

    Please post the *exact* code. With the "something like this" code, I was unable to reproduce the issue.

  • RE: Using Parameters in a Query is Killing Performance

    Loner: It's a long topic already so I may have overlooked something. Did you already try the OPTION (RECOMPILE) hint that Scott suggested? Did it help?

  • RE: Inconsistent subquery results

    Without knowing the sourcecode of the FileExists user-defined function, there is no way for us to tell you what's going on.

    However, if it works for you without the subquery then...

  • RE: Count number of visits each day

    This is called a problem in the "gaps and islands" category (islands in this case). Itzik Ben-Gan has come up with some very creative and smart solutions for problems in...

  • RE: How to query a Denormalised table

    Jeff Moden (2/18/2016)


    Ed Wagner (2/18/2016)


    I think Hugo hit the nail on the head. I can't believe those questions were even in an interview. There are a number of...

  • RE: t-sql 2012 select with different types of data

    Please post your table definitions in the form of CREATE TABLE statements, and your sample data in the form of INSERT statements.

    Then also post the exact output you want returned...

  • RE: thinking about Procedure vs trigger

    To reiterate what Steve already said: your problem is not clear. Please post it in a language that we all understand on this forum: in the form of CREATE TABLE...

  • RE: Hash Match Problem

    Thanks for posting a nice execution plan to sink my teeth into! 😉

    Just a few loose thoughts, in random order.

    * I see estimates that are off, but not way off....

Viewing 15 posts - 781 through 795 (of 3,348 total)