Re: quickie for a non-blonde!

2006-07-13 Thread Mike Aubury
Assuming that the lastest ID is the same as the current name - maybe something like : select * from sometab t1 where id=( select max(id) from sometab t2 where t1.code=t2.code ) On Thursday 13 July 2006 10:16, Helen M Hudson wrote: > If I have a table > primary key id | code

quickie for a non-blonde!

2006-07-13 Thread Helen M Hudson
If I have a table primary key id | code| name 1 | ABC | company 1 name 2 | ABC | company 1 name 3 | ABC | new company 1 name 4 | ABC | new company 1 na