GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  Informatica
Go To First  |  Previous Question  |  Next Question 
 Informatica  |  Question 298 of 327    Print  
Calculate max value of a column
How to calculate max value of a column without using aggregrator transformation?


  
Total Answers and Comments: 4 Last Update: December 06, 2008     Asked by: riteshpathak10 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
June 23, 2008 06:55:30   #1  
narasimha.inf Member Since: June 2008   Contribution: 2    

RE: Calculate max value of a column
max(sal)
 
Is this answer useful? Yes | No
July 01, 2008 07:58:10   #2  
adilshariff Member Since: June 2008   Contribution: 7    

RE: Calculate max value of a column
Use max(Value) in expression transformastion
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
September 01, 2008 07:49:26   #3  
jryan999 Member Since: April 2008   Contribution: 15    

RE: Calculate max value of a column
You need to feed your ports through an Aggregator Tranformation. eg.

Input salary. Not output
Output maximum_salary --> max(salary) - Output

Connect the maximum_salary fields to the output to use it
Define other keys as "Group by" as needed.

You cannot use max(salary) function in expression - it only works on a single row

 
Is this answer useful? Yes | No
December 05, 2008 19:35:46   #4  
dihydrox Member Since: December 2008   Contribution: 1    

RE: Calculate max value of a column
If you just need to get the max value by the end of session (to increment a value or put at the bottom of a flat file ) you can do the following.

Let's say you need to find the max value for a port called INCOME.
You feed rows through an expression. You create a new port that is either going to be local variable or output (depending what you want to do with it). Call it CURR_MAX and place it after the INCOME port. It will have the expression

IIF(CURR_VALUE>INCOME CURR_VALUE INCOME). That should do it.

Otherwise you either need to use a sorter which does caching anyway an Aggregator
or do a lookup on the source you are reading from where the lookup override SQL calculates the max(for relational) or it you are reading from a relational DB like Oracle use an analytic function

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape