GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Tech FAQs  >  Informatica
Go To First  |  Previous Question  |  Next Question 
 Informatica  |  Question 136 of 313    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   #1  
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   #2  
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   #3  
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  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape