Same thing; a calculation IS a "virtual column".
At least in this context: Bryce's problem was -- Chris thought, and I'll bet -- that *what he selected* in the first part of the select statement, the "column list" clause, he later -- in the Group By clause -- referred to by the alias he had defined for it, when he should have used "the original form". And it doesn't matter *what* exactly "what he selected" *is*; it can be a simple native column (aliased just for brevity/clarity), *or* a complex calculation involving gazillions of columns and googleplexes of function calls... To Oracle, it's all the same, as long as it *knows* it's the same thing you mean. (And it knows this if-and-only-if you refer to it in the same way you first *defined*, not alias-named, it.)
"It's the same"... As in, Oracle treats the result of the calculation exactly *as if it were* a column; to all intents and purposes, a "virtual column" -- that Oracle *does* know how to group on, original column or no -- has been born from his calculation. At least that's the smartest way for Bryce to think about it, because that allows him to see the obvious parallel with the simpler (this *is* for *Bryce's* benefit, after all!) case where there *is* an original column, that he is just renaming with an alias.
Now don't go protesting my paedagogical tricks -- at least, not until you recognise them for what they are -- any more, ya bastidge! :-)
[Edit:] And BTW, another way to put this -- i.e, all of the above -- would be, "What part of whether that be 'somedamnlongstupidcolumnname' or a calculation didn't you understand, DrooK?"
[link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad]
(I live in Finland, and my e-mail in-box is at the Saunalahti company.)
Your lies are of Microsoftian Scale and boring to boot. Your 'depression' may be the closest you ever come to recognizing truth: you have no 'inferiority complex', you are inferior - and something inside you recognizes this. - [link|http://z.iwethey.org/forums/render/content/show?contentid=71575|Ashton Brown]
Edited by
CRConrad
Sept. 24, 2003, 05:58:54 PM EDT
Same thing; a calculation IS a "virtual column".
At least in this context: Bryce's problem was -- Chris thought, and I'll bet -- that *what he selected* in the first part of the select statement, the "column list" clause, he later -- in the Group By clause -- referred to by the alias he had defined for it, when he should have used "the original form". And it doesn't matter *what* exactly "what he selected" *is*; it can be a simple native column (aliased just for brevity/clarity), *or* a complex calculation involving gazillions of columns and googleplexes of function calls... To Oracle, it's all the same, as long as it *knows* it's the same thing you mean. (And it knows this if-and-only-if you refer to it in the same way you first *defined*, not alias-named, it.)
"It's the same"... As in, Oracle treats the result of the calculation exactly *as if it were* a column; to all intents and purposes, a "virtual column" -- that Oracle *does* know how to group on, original column or no -- has been born from his calculation. At least that's the smartest way for Bryce to think about it, because that allows him to see the obvious parallel with the simpler (this *is* for *Bryce's* benefit, after all!) case where there *is* an original column, that he is just renaming with an alias.
Now don't go protesting my paedagogical tricks -- at least, not until you recognise them for what they are -- any more, ya bastidge! :-)
[link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad]
(I live in Finland, and my e-mail in-box is at the Saunalahti company.)
Your lies are of Microsoftian Scale and boring to boot. Your 'depression' may be the closest you ever come to recognizing truth: you have no 'inferiority complex', you are inferior - and something inside you recognizes this. - [link|http://z.iwethey.org/forums/render/content/show?contentid=71575|Ashton Brown]