Forum Replies Created

Viewing 15 posts - 6,436 through 6,450 (of 6,678 total)

  • RE: 99 Bananas

    What are your setting on the linked server for:

    Collation Compatible

    Use Remote Collation

    Collation Name

    You can try changing these to see if this corrects the problem. I have had situations when...

  • RE: SQL 2005 Server Performance on Multicore CPU

    My guess is that you really need to look at tuning the query. Without seeing the query, sample data, etc... I could not begin to guess at how to...

  • RE: Pivot... I don't think it's possible...

    Excellent work - I did not even think about pre-aggregating the data but it makes sense. But again, as I suspected, the original cross-tab version still performs better than...

  • RE: Pivot... I don't think it's possible...

    Okay, it can be done in a single pivot - but I had to cheat and performance will probably suffer. As far as I have been able to determine,...

  • RE: Pivot... I don't think it's possible...

    I don't think it is possible - and, you have to use the derived table (or a CTE) or you get some very interesting results. Try to pivot straight...

  • RE: use a sequence of column values in a query

    Of course, now that I actually think about it. Been a long day...

  • RE: sp_updatestats decreases performance

    sp_updatestats, by default - updates statistics with a default sampling rate. You can try using the resample option, but that will only work if an auto update has not...

  • RE: Pivot... I don't think it's possible...

    Not exactly a single pivot - but 😎

    SELECT amt.Company

    ,amt.Year

    ,COALESCE(amt.[1], 0.00) As Q1Amt

    ,COALESCE(qty.[1], 0.00) As Q1Qty

    ,COALESCE(amt.[2], 0.00) As Q2Amt

    ,COALESCE(qty.[2], 0.00) As Q2Qty

    ,COALESCE(amt.[3], 0.00) As Q3Amt

    ,COALESCE(qty.[3], 0.00) As Q3Qty

    ,COALESCE(amt.[4], 0.00) As...

  • RE: Sort Order - Include Null al last

    Based upon how the question was stated, and the example given - only the second one is correct. The third answer does not return the result with DateOfLeaving in...

  • RE: use a sequence of column values in a query

    Yes - and that is why I avoid using it in production code. Although in this situation I can see that it shouldn't matter much and you could always...

  • RE: use a sequence of column values in a query

    Yeah, I guess I could see using '*' in that situation - but it still suffers from the same problem. If someone modifies the source table, you will have...

  • RE: An Introduction To Linked Servers

    Sorry, guess I was not clear enough. All I was saying was that using synonyms ADDS options, but using synonyms does not replace using views at all.

    Just one example...

  • RE: An Introduction To Linked Servers

    I am not sure where synonyms cannot be used that views can. Any examples? I like the ability to abstract out access to linked servers and/or other databases...

  • RE: An Introduction To Linked Servers

    In the above, it is mentioned that you should create views to access your linked servers. That is good, but I would go one step further and define synonyms...

  • RE: use a sequence of column values in a query

    Everything Jeff has given you is good, but - you don't need to modify any code at all including modifying the views if you use Synonyms. Here is an...

Viewing 15 posts - 6,436 through 6,450 (of 6,678 total)