GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  Informatica
Go To First  |  Previous Question  |  Next Question 
 Informatica  |  Question 136 of 335    Print  
write a query to retrieve latest records from the target table means if we have used scd2 version type of dimension, than retrieve the record with highest version no.for eg

verno id loc
1 100 bang
2 100 kol
1 101 bang
2 101 chen

we have to retrieve 100/kol and 101/chen. how it is possible through query.

  
Total Answers and Comments: 3 Last Update: April 04, 2007     Asked by: ravi214u 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
February 12, 2007 23:59:47   
Ranganath Nagaraj        

RE: write a query to retrieve latest records from the ...
answer is here for your question:1. Get the distict value and put order by desc for version Id.. you can get the latest record..
 
Is this answer useful? Yes | No
February 14, 2007 02:52:38   
sai        

RE: write a query to retrieve latest records from the ...
hi solution is here. hi ranganath u r answer is wrong it will give latest of all employee records.but the question is latest record of each employee.for this this is d answerselect x.* from tablewname x where rowid in (select max(rowid) from tablename group by empno );i hope this will be the exact answer.
 
Is this answer useful? Yes | No
April 03, 2007 22:16:38   
Rvinder Ravula        

RE: write a query to retrieve latest records from the ...

Dear Friend

select * from table_name where rowid in (select max(rowid) from table_name groupby verno);


U try this one...

Thanks
Ravinder Ravula


 
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 - 2010 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape