Viewing 15 posts - 3,556 through 3,570 (of 4,085 total)
The most likely reason is that your interim result set has a column that is not being pivoted on nor in the final select list. PIVOT groups by ALL...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 11, 2011 at 2:43 pm
Your approach is fraught with problems. For example, what if the load fails on a Friday and you're trying to load it on a Monday? Yesterday's filename will...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 11, 2011 at 12:11 pm
bkubicek (10/11/2011)
You seem to be joining to the same table over and...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 11, 2011 at 8:35 am
By default, an Execute SQL Task only returns success/failure information to the package. If you want to use the output of a result set, you need to specify the...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 10, 2011 at 3:12 pm
Your PARTITION BY is wrong. You want the last record for each Service_Tag, so the PARTITION BY should just be on the Service_Tag, and not on the Service_Tag, Employee_ID...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 7, 2011 at 1:38 pm
This is just a guess, but it probably needs consistent resultsets. That would mean no IF statements, no dynamic SQL, etc. In this particular example, you can replace...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 7, 2011 at 11:06 am
Performace Guard (Shehap) (10/7/2011)
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 7, 2011 at 10:16 am
Now that you mention it, my trigger actually did the reverse. The person who designed one of the tables didn't normalize it properly. The trigger I wrote created...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 7, 2011 at 10:02 am
I'm not sure that this is a T-SQL issue. You may have better luck posting in a forum for the application/language that you are working with. I did...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 7, 2011 at 9:33 am
GilaMonster (10/6/2011)
Read up on the UPDATED() and COLUMNS_UPDATED () functions.
When doing UPDATEs, you should be aware that UPDATED() does not necessarily mean CHANGED. It simply means that a...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 7, 2011 at 8:43 am
I don't think so, because of the following condition "clsdt_date = wrkcpl_date".
You can't do an index seek on cssdt_date until you know the values for wrkcpl_date. You can't do...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 6, 2011 at 3:05 pm
You're mixing the syntax for UPDATE and UPDATETEXT. You need to use one or the other.
text fields are being deprecated. You should consider changing it to a varchar(max)...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 6, 2011 at 2:24 pm
kramaswamy (10/6/2011)
That one unfortunately gives me a result of 92 minutes, while the actual result should be 62 minutes.
I'm getting 62 minutes. Which set of data are you using?
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 6, 2011 at 1:26 pm
Here is code that gives the correct result for your sample data. From there, you should be able to figure out a way to optimize it.
;WITH PlannedWork AS (
SELECT...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 6, 2011 at 1:07 pm
I'm going to throw a wrench in the works. All of your data has had roughly equivalent start and end times for the planned and actual data. Suppose...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 6, 2011 at 11:57 am
Viewing 15 posts - 3,556 through 3,570 (of 4,085 total)