Viewing 15 posts - 10,336 through 10,350 (of 18,926 total)
4th or 5th time already in the last 2-3 months... This one comes up all the time.
January 10, 2007 at 9:18 am
I was just demonstrating with a sample dataset that AVG and sum/count() handle nulls differently. Now to think of it I would assume that the avg would be too low and...
January 10, 2007 at 9:17 am
Can you show us the some sample data and the required output from the update query... I'm sure there's a way to avoid the spool altogether.
January 10, 2007 at 8:43 am
That's what I thaught. Thanx for the quick fix
.
January 10, 2007 at 8:42 am
What are you not understanding?
Do you see something wrong with the results of the 2 averages?
January 10, 2007 at 8:41 am
Well with a quick scan I can spot a LOT of table scans which is really not a good thing (most of the time).
I think I'll suggest you search this...
January 10, 2007 at 8:30 am
Still not quite. You can have up to a few MBs of data for a single object. That's why I coded this client side in VBA where I have no...
January 10, 2007 at 8:26 am
Can you edit your post so that it's more readable... I'm not sure you'll get much attention from anyone with that question.
January 10, 2007 at 8:24 am
You can't use the aliased name withing the same query where it was produced (unless in the order by clause). You either have to reuse the calculation in the next...
January 10, 2007 at 8:23 am
--I don't know if you are experiencing that particular problem but it's always worth mentioning it
SELECT
AVG(dtDemo.N) AS Avg1
, COUNT(*) AS Count1
, SUM(dtDemo.N) AS Sum1
, SUM(dtDemo.N) /COUNT(*) AS AVG2
FROM...
January 10, 2007 at 8:05 am
That should do it the query you need is the last query of the batch... all the rest is setup tables and feed sample data :
USE SSC
GO
IF
January 10, 2007 at 8:00 am
Do you allow nulls to any of the agregate columns?
January 10, 2007 at 7:19 am
HTH. Do you still need help understanding the concept of implicit conversions?
January 10, 2007 at 6:33 am
Are you sure they are running this from within the right database?
Can you check the code in the master database to see if the system proc shows only the text...
January 9, 2007 at 9:48 pm
Ya and also you'll have to check all your input parameters and variables in the code to avoid implicit conversions.
January 9, 2007 at 9:44 pm
Viewing 15 posts - 10,336 through 10,350 (of 18,926 total)