How to find from a source which has 10,000 records, find the
average between 500th to 600th record?
Answers were Sorted based on User's Feedback
Answer / guest
In the sql override, add a column for rownum which
generates the sequence numbers. Pass them into a filter
transformation to filter the records between 500 and 600.
And do the required aggregation through Aggregator
Transformation.
Through SQL :
select avg(sal) from (select id,name,sal,rownum r from
table_name )
where r between 500 and 600;
Hope this works..... if not please let me know
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / sudhar
Your answer is correct for the flat files. But the RElation
query you have given won't give any records.
the Query should like this
select avg(sal) from
(select emp_id, sal, rownum rnum from (
select emp_id,sal from emp order by sal desc) )where rnum
between 500 and 600
Might be this Query can be simplified with Rank option in
Oracle.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / krishna
first u take the source,if it is flat file or relational
table then using exp t/r create one variable port.the port
like v.
increment the v value for every record .
after u write the condition in filter t/r v>=500 and v<=600
After use agg t/r and select the group by port as sal and
write the agg function avg(sal).After give the output that
port to target table
if it is relational table then use direct query in sql over
ride in source qualifier itself like
SELECT * FROM <TABLE NAME> WHERE ROWNUM>=500 AND
ROWNUM<=600
Is This Answer Correct ? | 3 Yes | 2 No |
write sql query following table amount year quarter 1000 2003 first 2000 2003 second 3000 2003 third 4000 2003 fourth 5000 2004 first 6000 2004 second 7000 2004 third 8000 2004 fourth i want the output year q1_amount q2_amount q3_amount q4_amount 2003 1000 2000 3000 4000 2004 5000 6000 7000 8000 can anybady help me to achieve the aboue result by using informatica. thanks in advance.
On a day i load 10 rows in my target and on nextday i get 10 more rows to add in target. But out of 10 - 5 records are send them to target?how i can insert the remaining records
what is junk dimension
How can we use mapping variables in informatica? Where do we use them?
what are the differences between powercenter 8.1 and powercenter 8.5?
Explain lookup transformation source types in informatica
Suppose i have 10000 records.First time i have to load 1 to 1000 records and second run i have load 1000 to 2000 records and third load i have to load 2000 to 3000 rows .How will achieve
Differnce between filter and router?
following table source name gender a1 male a2 female how to change 'male' to 'female' and 'female' to 'male'
Performance tuning( what you did in performance tuning)
I want to run a informatica worklow after complition of oracle procedure. That procedure is not running through informatica and can be run at any time in database. Informatica is in windows environment. Is it possible ? If yes please explain.
What are the measure objects?