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

  • Home
  • SEARCH
  • 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 9098399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:21:04+00:00 2026-06-17T00:21:04+00:00

This question is related to THIS topic What I have is: LOOP FETCH l_get_data

  • 0

This question is related to THIS topic

What I have is:

LOOP
      FETCH l_get_data INTO 
                l_first_name, l_last_name, l_email, l_phone, l_us_id, l_us_fullname, l_user_type,
                l_line_manager_1, l_line_manager_2, l_line_manager_3, l_line_manager_4, l_line_manager_5,
                l_us_flags, l_business_unit, l_position, l_middlename ;
      EXIT WHEN l_get_data%NOTFOUND;
      l_jsonObj := json();
      l_jsonObj.put('userFirstName', l_first_name );   
      l_jsonObj.put('userLastName', l_last_name);
      l_jsonObj.put('userEmail', l_email);

      IF l_phone IS NULL THEN l_jsonObj.put('userPhone', '');
      ELSE l_jsonObj.put('userPhone', l_phone); END IF;

      l_jsonObj.put('login', l_us_id);
      l_jsonObj.put('userFullName', l_us_fullname);
      l_jsonObj.put('userType', l_user_type);

      IF l_line_manager_1 IS NULL THEN l_jsonObj.put('lineManager1', '');
      ELSE l_jsonObj.put('lineManager1', get_full_name(l_line_manager_1)); END IF;

      IF l_line_manager_2 IS NULL THEN l_jsonObj.put('lineManager2', '');
      ELSE l_jsonObj.put('lineManager2', get_full_name(l_line_manager_2)); END IF;

      IF l_line_manager_3 IS NULL THEN l_jsonObj.put('lineManager3', '');
      ELSE l_jsonObj.put('lineManager3', get_full_name(l_line_manager_3)); END IF;

      IF l_line_manager_4 IS NULL THEN l_jsonObj.put('lineManager4', '');
      ELSE l_jsonObj.put('lineManager4', get_full_name(l_line_manager_4)); END IF;

      IF l_line_manager_5 IS NULL THEN l_jsonObj.put('lineManager5', '');
      ELSE l_jsonObj.put('lineManager5', get_full_name(l_line_manager_5)); END IF;

      IF INSTR(l_us_flags, 'DIS', 1, 1) = 0 THEN l_jsonObj.put('active', 'Yes');
      ELSE l_jsonObj.put('active', 'No'); END IF;

      IF l_business_unit IS NULL THEN l_jsonObj.put('businessUnit', '');
      ELSE l_jsonObj.put('businessUnit', l_business_unit); END IF;

      IF l_position IS NULL THEN l_jsonObj.put('position', '');
      ELSE l_jsonObj.put('position', l_position); END IF;

      IF l_middlename IS NULL THEN l_jsonObj.put('userMiddleName', '');
      ELSE l_jsonObj.put('userMiddleName', l_middlename); END IF;

      l_jsonArray.append(l_jsonObj.to_json_value);
      l_select_data.put(l_us_id, l_us_fullname);
    END LOOP;

    CLOSE l_get_data;

The problem is that I’m getting this error: invalid cursor

I have checked 100 times my code and there are no logical errors(at least I can’t see them). I’m fetching the data and then I’m trying to pass it to the parameters without success.

I’m asking for a small clue on where the problem is, or what is causing it, I’m sure it’s somthing really small, but important.

  • 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-17T00:21:05+00:00Added an answer on June 17, 2026 at 12:21 am

    The above code is correct, what I had wrong was a the name of the parameter I was passing! Thanks for trying to help me!

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

Sidebar

Related Questions

I have searched almost every possible question related to this topic but not able
The title is my question. I already found a topic related to this here
This question is related to awk, I suppose. I have no experience with awk.
I posted a question related to this topic earlier, but I'm having trouble figuring
My question is related to this topic How to copy and paste code without
This question is related to this topic. I changed the syntax to one that
I have seen some of the questions/answers related to this topic here, however still
I have a new question related to this question , but since the questions
I’ve previously asked a question related to this topic as well and with the
I know there have been a lot of discussion related to this topic, e.g.

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.