Viewing 15 posts - 3,571 through 3,585 (of 4,085 total)
TDSapp (10/6/2011)
CELKO (10/5/2011)
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 6, 2011 at 11:34 am
ulteriorm (10/6/2011)
O..o It would have been incredibly simple if i had to return just the min and max on year.:-P
I think it IS that simple. Your expected results...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 6, 2011 at 10:10 am
sqlfriends (10/6/2011)
It looks like we should use below from your previous post, will this improve performanceselect ids.id.value('@id', 'int') as id
from @xml.nodes('/root/r') ids(id)
XML is case sensitive, so that should be
select...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 6, 2011 at 9:26 am
kramaswamy (10/5/2011)
Row 2: From 10:11 AM to 11:28 AM. Was supposed to...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 6, 2011 at 8:49 am
You don't need to join on Table_1 for this particular query, but that could just be an artifact of the simplified data.
In any case, you might want to group your...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 6, 2011 at 7:54 am
Actually, if you want to return anything other than the amount--which you probably do, since you asked for details--you should look at the Row_Number() function.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 5, 2011 at 2:50 pm
I did look at using an APPLY rather than a subquery, but the execution plans for both were essentially the same. The only difference I found was that the...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 5, 2011 at 11:23 am
The standard way is something like the following:
SELECT DISTINCT [State]
, Stuff(
(SELECT ', ' + City
FROM Table1 AS t2
WHERE t1.[State] = t2.[State]
ORDER BY City
FOR XML PATH('')
)
, 1 -- start position
,...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 5, 2011 at 9:54 am
For performance issues, it really helps to have the actual and/or estimated execution plans.
One thing you can try on your own is turning on XML statistics before the rest of...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 4, 2011 at 3:36 pm
Sean Lange (10/4/2011)
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 4, 2011 at 1:14 pm
Using the distributive properties of multiplication over addition, your formula
sum(cast(l.labor as decimal(18,2)) * count(distinct d.sn) / 1000 * 23.37) as appLabor
is equivalent to the following formula
sum(cast(l.labor as decimal(18,2))) * count(distinct...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 4, 2011 at 12:51 pm
Kenneth Fisher-475792 (10/3/2011)
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 3, 2011 at 1:32 pm
mapperhd (10/2/2011)
Thanks for the replies.However, I need to keep only the columns that are not equal.
The problem with this is that it forces you to violate the first normal form...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 3, 2011 at 1:07 pm
Kenneth Fisher-475792 (10/3/2011)
drew.allen (9/30/2011)
Kenneth Fisher-475792 (9/30/2011)
I'm looking for a query to take the following table
This is a report and you should be using a reporting tool to generate it. ...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 3, 2011 at 9:45 am
Prasanthi Reddy (10/2/2011)
Hi,I have a table which contains on and off status of a meter. Feederstatus = 0 means On and feederstatus=1 means Off.
You do realize that this is exactly...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 3, 2011 at 8:33 am
Viewing 15 posts - 3,571 through 3,585 (of 4,085 total)