Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Inner joins
05-01-2011, 03:34 PM
Post: #1
Inner joins
Hi folks,

Recently i was working on a project and found a new way to take an inner join.

here we goes

select *
  from account a, accountstatus acs
   and acs.account_num = a.account_num
   and acs.effective_dtm =
       (select max(effective_dtm)
          from accountstatus
         where account_num = acs.account_num)
this will fetch the information from the account table based on the latest information (which is date in this case) from the accountstatus table

Oracle Certified Trainer
[Image: signature.php?uid=40]
05-01-2011, 04:10 PM
Post: #2
RE: Inner joins
Nice sharing....Keep posting like same things.......

“A mind stretched by a new idea can never go back to its original dimension.”


User(s) browsing this thread: 1 Guest(s)