Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8153093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:54:24+00:00 2026-06-06T15:54:24+00:00

I am stuck in a situation from which I am finding no solution. Let

  • 0

I am stuck in a situation from which I am finding no solution. Let me give the PL/SQL code:

begin 
      outer_loop_counter := 0;
      inner_loop_counter := 0;
      -- Open first cursor
      open get_vacancy;
      --<<Outer_loop>>
      loop

          fetch get_vacancy 
          into v_category, v_gender, v_vacancy_count;
          exit when get_vacancy%NOTFOUND;
          open get_candidate;
          --<<Inner_loop>>
          for inner_loop_counter in 1 .. v_vacancy_count
          loop
             fetch get_candidate 
              into  c_rollno, c_category,c_gender,c_total_marks;
          update merit_list m set m.merit_position = inner_loop_counter;
          end loop; --Inner_loop;
          close get_candidate;
       end loop; --Outer_loop;
       close get_vacancy;
       end;

The above code is for preparing a merit list for an Admission Application for a College which I am Developing using Java and Oracle. Now the policy is depending upon the number of vacancy from each row fetch, the candidates will be allocated a merit rank. Now the problem with the above code is that for every fetch from the get_vacancy cursor, the inner loop cursor is fetching the records from beginning of the resultset. I want that the candidates who were allocated merit rank in the last fetch do not appear in the next fetch when the cursor moves w.r.t get_vacancy cursor. What should I do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T15:54:26+00:00Added an answer on June 6, 2026 at 3:54 pm

    I’ll assume the GET_CANDIDATE cursor reads (or can be made to read from) the MERIT_LIST table. Given this, you should be able to add the following to the WHERE clause of your cursor

    AND MERIT_LIST.MERIT_POSITION IS NULL
    

    This assumes that MERIT_POSITION is in fact NULL for candidates which have not been assigned a position yet.

    Share and enjoy.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am stuck at the situation where I want the url, which contains a
im stuck in a situation where i am switching from activity 1 to activity
I am stuck in weird situation. I want to upload photo from my iPad
I'm using ASP.NET MVC 2 and stuck with the situation when needed to store
I am new to iPhone programming, and stuck in a situation. The situation is
I'm a bit stuck with my code: def setVenueImage(img): img = images.Image(img.read()) x, y
I have an awkward situation in which I have a 32-bit lib that must
I'm stuck for about 2 days in the same situation and i'd really appreciate
The Situation As some of you might already know from my previous questions, I'm
I am stuck in a very weird situation. There is a two method defined

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.