Viewing 15 posts - 3,166 through 3,180 (of 4,086 total)
This problem is almost certainly due to parameter sniffing. Gail has a good article on Parameter Sniffing[/url]
There are other issues with your code, though. You should use a...
May 10, 2012 at 12:29 pm
You've been around long enough that you should know that we're going to ask for DDL, sample data, and the actual execution plan.
I think that part of the problem is...
May 10, 2012 at 9:21 am
You should be using sp_executesql rather than EXEC. BOL has examples of using parameters including OUTPUT parameters.
Drew
May 10, 2012 at 7:11 am
riya_dave (5/9/2012)
hiwhen i am showing estimate execution plan,SSMS just stops working.
what causes it to stop working.
Any idea?
Let me guess. This is the same query where you replaced a CURSOR...
May 9, 2012 at 1:42 pm
riya_dave (5/9/2012)
i have cursor in my sp ,so i tried to remove it with while loop in order to enhance performance,but it takes more time than cursor.
I am calling 5-6...
May 9, 2012 at 10:35 am
Eugene Elutin (5/9/2012)
... complex OLAP is better done in a tool specifically designed to do OLAP such as SSAS...
So far OP failed to present enough details about required output to...
May 9, 2012 at 10:28 am
Without sample data, it's hard to tell what the problem is. Here is what I suspect is happening. Your TableA has multiple procedures for a given unit, some...
May 9, 2012 at 8:54 am
vinu512 (5/8/2012)
Todd's Logic is very nice. Didn't hit me when I was trying it.
But it was just lacking something.
I tweaked it a little and got it working. 😀 Here's how...
May 9, 2012 at 8:26 am
I think that T-SQL is simply the wrong tool for this particular job. T-SQL is designed to optimize transactional processing. While you can do basic analytical processing in...
May 9, 2012 at 7:56 am
Sean Lange (5/8/2012)
update pjprojex
set rev_type...
May 9, 2012 at 7:40 am
The key is to understand that there aren't 52 weeks in your year, but rather 52.2 weeks rounded down (truncated).
Try the following
MyCount = Round(datediff(day, @CalendarStartDate, CalendarDate) / (7 * 52.2...
May 8, 2012 at 12:36 pm
anthony.green (5/8/2012)
If only a time value is assigned to a variable of a date data type, the value of the...
May 8, 2012 at 11:17 am
This will produce what you are looking for, but I agree with Eugene that the reasons for producing this result are suspect.
SELECT STUFF(( SELECT ', ' + field2 FROM #Tbl...
May 8, 2012 at 10:50 am
If you have enough units of measure, you'll probably want to create a conversion table instead of using the CASE Statement. Something like the following.
DECLARE @Sample TABLE
(origin_code char(5) NOT...
May 8, 2012 at 10:25 am
GSquared (5/3/2012)
MS documentation makes it very clear exactly what's being deprecated, which is the use of *= and =* in the Where clause for an outer join.
If it's so clear,...
May 3, 2012 at 1:30 pm
Viewing 15 posts - 3,166 through 3,180 (of 4,086 total)