Dugi Posted 11 years ago You are commenting using your Twitter account. Home Questions Tags Users Unanswered. Email Required, but never shown. You can’t post new topics. What is decode equivalent function in Teradata. With converting the entire result set to CHAR;. Apologies for the bad title, I wasn’t sure what would be a good title for this.
By continuing to use this website, you agree to their use. Sign up using Facebook. Sign up or log in Sign up using Google. Home Questions Tags Users Unanswered. Email Required, but never shown. If you are calculating a division on the fly and the numerator is greater than the denominator than there is a chance that you would not see the result as expected.
The problem is that Sum commission gets calculated for each and every row, and given that this query would be run on a Data Warehouse, the data set would be rather large currently, it’s just under records and quite honestly, a bad approach IMO.
CAST in Teradata
Tedadata 21, in IT. You can’t send private messages. You can’t vote in polls. Post as a guest Name. You can’t edit your own posts. Remember it is before the decimal point and NOT after the decimal. This is currently simplified view of the data I’m working with Agent Commission Smith Neo Morpheus I need to calculate the percentage of the total commission, each agent is responsible for. Email required Address never made percentaye. Not obviously a DBA question perhaps if it were tablespaces rather than salesmen?
Gail Shaw Microsoft Certified Master: I find it on another way like this but Gila’s post is the best for me!?
Home Questions Tags Users Unanswered. Sign up using Facebook. Fill in your details below or click an icon to log in: We walk in the dark places no others will enter We stand on the bridge and no one may pass.
Leigh Riffel Leigh Riffel GilaMonster Posted 11 years ago So for example, week one for taco bell would have the percentage of food for breakfast as. You can’t delete your own posts. Increase the number by reducing the 2nd parameter in the decimal function. You can’t delete other posts. You can’t delete your own events.
I am trying to figure out a way to add a column that has a percentage of a total based on information of the column. Here is a simplified version of my SQL code which works fine and table result: General Forum Members Points: Calculating percentage of a row over total sum Ask Question.
aggregate – Calculating percentage of a row over total sum – Database Administrators Stack Exchange
You can download attachments. Notify me of new comments via email. Is it possible to sort values in ascending Order? Also, calling the function for every agent would be considerably less cwst than calling one SQL statement for all agents if your application can be designed in that manner.
Add column for percentage of a total in Teradata SQL – Stack Overflow
Well I am expecting result in following order: Is there a csst of having the Sum Commission not calculate for every row being fetched? Sign up using Email and Password. SMAZ Posted 11 years ago There are tradeoffs in memory and CPU between these options, so the choice may not always be clear cut, but in this case I think it is.
Post reply Like Add to Briefcase. You can’t upload attachments. Create a free website or blog at WordPress.
You can’t edit other posts. Awesome, didn’t know about this, thanks! You can’t edit other topics. Dugi Posted 11 years ago You can’t post HTML code.