SUM question [solved]
-
Hy, Supose we have this:
SELECT SUM(ProdGood) as TotalProduced
From ProductionDataNow if ProdGood is defined as int(eger) will SUM(ProdGood) be also integer or will it go to BigInt if the SUM is lager than the largest int? Thanks in advance. Oh, I tried google but nothig relevant came out.
modified on Sunday, February 28, 2010 2:14 AM
-
Hy, Supose we have this:
SELECT SUM(ProdGood) as TotalProduced
From ProductionDataNow if ProdGood is defined as int(eger) will SUM(ProdGood) be also integer or will it go to BigInt if the SUM is lager than the largest int? Thanks in advance. Oh, I tried google but nothig relevant came out.
modified on Sunday, February 28, 2010 2:14 AM
That's an excellent question! I did some searching and couldn't find a definitive answer, either. Have you tried forcing a too large result using test data yet? It would be worthy of an article to explore this further.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
-
That's an excellent question! I did some searching and couldn't find a definitive answer, either. Have you tried forcing a too large result using test data yet? It would be worthy of an article to explore this further.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
-
Hy, Supose we have this:
SELECT SUM(ProdGood) as TotalProduced
From ProductionDataNow if ProdGood is defined as int(eger) will SUM(ProdGood) be also integer or will it go to BigInt if the SUM is lager than the largest int? Thanks in advance. Oh, I tried google but nothig relevant came out.
modified on Sunday, February 28, 2010 2:14 AM
As you found out the data types do not change to meet the needs of the content. If you think about it this would be a disaster in any system that used even minimal data typing. VB could probably handle it X| Another interesting one is trying to work out the result type when you multiple an integer by a decimal and divide it by a float and add a numeric :wtf:
Never underestimate the power of human stupidity RAH
-
As you found out the data types do not change to meet the needs of the content. If you think about it this would be a disaster in any system that used even minimal data typing. VB could probably handle it X| Another interesting one is trying to work out the result type when you multiple an integer by a decimal and divide it by a float and add a numeric :wtf:
Never underestimate the power of human stupidity RAH