Viewing 15 posts - 3,166 through 3,180 (of 4,085 total)
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...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 9, 2012 at 7:56 am
Sean Lange (5/8/2012)
update pjprojex
set rev_type...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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,...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 3, 2012 at 1:30 pm
Eugene Elutin (5/3/2012)
Actually this material wasn't written by SQL Server team and I would say it's irrelevant to MS T-SQL...
How do you know who wrote it? I don't see...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 3, 2012 at 11:01 am
Viewing 15 posts - 3,166 through 3,180 (of 4,085 total)