oracle8.1.6 select survey_response.initial_response_id(:response_id) as initial_response_id from dual select count(*) from survey_responses where survey_id=:survey_id and survey_response.initial_user_id(response_id)=:user_id and initial_response_id is null