Viewing 15 posts - 6,436 through 6,450 (of 6,678 total)
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...
June 23, 2008 at 3:06 pm
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...
June 23, 2008 at 11:08 am
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...
June 23, 2008 at 10:41 am
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,...
June 22, 2008 at 11:20 pm
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...
June 22, 2008 at 9:55 pm
Of course, now that I actually think about it. Been a long day...
June 22, 2008 at 9:50 pm
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...
June 22, 2008 at 9:48 pm
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...
June 22, 2008 at 9:31 pm
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...
June 22, 2008 at 5:50 pm
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...
June 22, 2008 at 4:30 pm
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...
June 22, 2008 at 2:39 pm
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...
June 22, 2008 at 2:04 pm
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...
June 22, 2008 at 12:07 pm
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...
June 22, 2008 at 11:37 am
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...
June 22, 2008 at 11:17 am
Viewing 15 posts - 6,436 through 6,450 (of 6,678 total)