> ..., but is it correct? No, very dangerous. You're depending on the values of band and destination just happening to be correct in this implementation.
select areacode, band, destination from stdcodes where areacode = (select max(areacode) from stdcodes where '001212' like areacode || '%') --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]