October 11, 2011 at 2:54 am
I have some data in sql serve which I am trying to summarize with the following syntax:
SELECT
SUM(DATA) AS ENTITY_TOTAL
,HFM_ENTITY
FROM dbo.vw_TotalAuditJournalID
GROUP BY HFM_ENTITY
When I export the view vw_TotalAuditJournalID into excel and do exactly the same thing via a pivot I get completely different results. DO you have any ideas why this may be happening?
October 11, 2011 at 6:00 am
In what way are the results different? What's the data type of the "DATA" column?
Is HFM_ENTITY a character column? If so, do you have a case sensitive collation in SQL Server?
Are you sure the whole table is exported to Excel? If you're using an old version (or are exporting using an older Excel driver), it will limit this to 65,536 rows...
October 11, 2011 at 6:52 am
My Apologies. I was counting the rows instead of summing them in the excel pivot. My Bad:blush:
October 11, 2011 at 6:59 am
eseosaoregie (10/11/2011)
My Apologies. I was counting the rows instead of summing them in the excel pivot. My Bad:blush:
That'd do it.
We all have those moments.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply