TERADATA SQL CAST AS PERCENTAGE

Sign up using Email and Password. Stack Overflow works best with JavaScript enabled. You can’t post topic replies. 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. Increase the number by reducing the 2nd parameter in the decimal function. You are commenting using your WordPress. Leigh Riffel Leigh Riffel You can’t edit other events.

Apologies for the bad title, I wasn’t sure what would be a good title for this. You are commenting using your WordPress. You can’t vote in polls. With converting the entire result set to CHAR;. Post Your Answer Discard By clicking “Post Your Answer”, you acknowledge that you have read our updated terms of service , privacy policy and cookie policy , and that your continued use of the website is subject to these policies. 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. You can’t edit other events.

You can’t post new polls. Gila you are very SQL Sick To return all agents with their commissions and commission percentages use an analytic function with no analytic clause so that the partition is over the whole table:. 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 perdentage result as expected.

  EXBAYRNER EPISODE 276

Post as a guest Name. One more querstion on thsi: Now the result is as follow: I find tsradata on another way like this but Gila’s post is the best for me!? You can download attachments. So, first make sure the ground work is done. You are commenting using your Twitter account.

Post Your Answer Discard By clicking “Post Your Answer”, you acknowledge that you have read our updated terms of serviceprivacy policy and cookie policyand that your continued use of the website is subject to these policies. I have a function returning the commission for each agent. SMAZ Posted 11 years ago Format values as Percent. 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.

Here is a simplified version of my SQL code which works fine and table result: Awesome, didn’t know about this, thanks! Post reply Like Add to Briefcase. You can’t send private messages.

ReadVitamin

Post Your Answer Discard By clicking “Post Your Answer”, you acknowledge that you have read our updated terms of serviceprivacy policy and cookie policyand that your continued use of the website is subject to these policies. I think it’s possible but I just can’t grasp the way to do it. Email Required, but cawt shown. Notify me of new comments via email.

Discussions on DB performance with occasional diversions into recoverability We walk in the dark places no others will enter We stand on the teeadata and no one may pass. I am trying to figure out a way to add a column percetnage has a percentage of a total based on information of the column. Well I am expecting result in following order: You can’t edit your own events. You can’t delete your own events.

  FALSIFICATORUL DE BANI FILM ONLINE

One more way with converting the entire result set to CHAR. By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service.

Is it possible to sort values in ascending Order? To find out more, including how teraadata control cookies, see here: You can’t edit other topics.

CAST in Teradata

Unthreaded, ascending Unthreaded, descending. General Forum Members Points: You can’t post HTML code. You can’t vote in polls.

You are commenting using your Facebook account. June 21, in IT.

Formatting numbers in Teradata

Dql this is the case, then the package solution may help, but it depends on how your application works. You could try the following query, sum commission will only be calculated once: Apologies for the bad title, I wasn’t sure what would be a good title for this.

Dugi Posted 11 years ago Email required Address never made public.

This site uses cookies.