postgresql7.1
select da.archive_name,
dar.version_name,
dar.revision_id,
dar.approved_p,
coalesce(dar.approved_comment, 'No comment') approved_comment,
to_char(dar.creation_date,'Mon DD, YYYY') as creation_date
from download_arch_revisions_obj dar, download_archives_obj da
where da.repository_id = :repository_id and
dar.archive_id = da.archive_id and
approved_p != 't' and
dar.creation_user = :user_id
order by creation_date