Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Selecting records that have same ID but different date v
Message
Information générale
Forum:
Oracle
Catégorie:
PL/SQL
Divers
Thread ID:
00494665
Message ID:
00494701
Vues:
17
No problem. I didn't notice it until I tried it and got the error < g >. I think this last idea just might work! Thanks so much. I have been banging my head against this all day and couldn't come up with anything. You the man! LOL

Thanks again,
George



>>>See if this works:
>>>
>>>select fieldlist from mytable where id in (select id, max(effectdate) from mytable group by id)
>>
>>Thanks for the quick reply Mark. Unfortunately since we're using the IN clause the sub-select would have to be on one value only :(
>
>Well that was dumb of me. How about creating a view in your Oracle DB:
>
>create or replace view someview as select id, max(effectdate) as LastDate from mytable group by id
>
>Then retrieving the records would be quite simple using the subquery.
Everything we see or seems
Is but a dream within a dream
- Edgar Allen Poe
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform