oracle8.1.6 select fs_objects.object_id, fs_objects.name, fs_objects.live_revision, fs_objects.type, to_char(fs_objects.last_modified, 'YYYY-MM-DD HH24:MI:SS') as last_modified_ansi, fs_objects.content_size, fs_objects.url, fs_objects.key, fs_objects.sort_key, fs_objects.file_upload_name, case when fs_objects.last_modified >= (sysdate - :n_past_days) then 1 else 0 end as new_p from fs_objects where fs_objects.parent_id = :folder_id order by sort_key, name