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 7520317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:03:04+00:00 2026-05-30T02:03:04+00:00

Here’s my application workflow. I have a ref cursor that is populated with all

  • 0

Here’s my application workflow.

I have a ref cursor that is populated with all my employees IDs..It’s just an identification number really.

But now I want to fetch a lot of information for every employee…(as fetched form the ref cursor).It’s not simply data, but a lot of computed,derived data too. The sort of derivation that’s more easily done via cursors and procedures and so on….

For example, the sum of all the time intervals during which an employee was stationed in Department 78…(that could be just one of the columns for each employee).

So I think I could accomplish this with a really large (by large, I mean really difficult to maintain, difficult to understand, difficult to optimize, difficult to reuse, refactor..etc etc) SQL query, but that really isn’t something I’d do unless as a real last resort.

So I’m trying to find ways to use all of PL/SQL‘s might to split this into as many separate units (perhaps functions or procedures) as possible so as to be able to handle this in a simple and elegant way…

I think that some way to merge datasets (ref cursors probably) would solve my problems… I’ve looked at some stuff on the internet until now and some things looked promising, namely pipelining… Although I’m not really sure that’s what I need..

To sum up, what I think I need is some way to compose the resulting ref cursor(a really big table, one column for the ID and about 40 other columns, each with a specific bit of information about that ID‘s owner.),using many procedures, which I can then send back to my server-side app and deal with it. (Export to excel in that case.)

I’m at a loss really.. Hope someone with more experience can help me on this.

FA

  • 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-05-30T02:03:05+00:00Added an answer on May 30, 2026 at 2:03 am

    I’m not sure if that is what you want, or how often do you need to run this thing
    But since it sounds very heavy maybe you dont need the data up to date this second
    If it’s once a day or less, you can create a table with the employee ids,
    and use seperate MERGE updates to calculate the different fields
    Then the application can get the data from that table
    You can have a job that calculates this every time you need updated data.
    You can read about the merge command here wiki and specifically for oracle here oracle.
    Since you use separate commands you can of course do it in different procedures if that is convenient.

    for example:

    begin
    execute immediate ‘truncate table temp_table’;

    insert into temp_table select emp_id from emps;

    MERGE INTO temp_table a
    USING (
    select name ) b
    on (a.emp_id = b.emp_id )
    WHEN MATCHED THEN
    UPDATE SET a.name = b.name; …

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

Sidebar

Related Questions

Here is the issue I am having: I have a large query that needs
Here's my scenario - I have an SSIS job that depends on another prior
Here is my code (Say we have a single button on the page that
Here is another spoj problem that asks how to find the number of distinct
Here's the scenario: I have a local git repository that mirrors the contents of
Here's the problem....I have three components...A Page that contains a User Control and a
Here's the situation, i want to have a user that can enter time on
Here is my problem...I have a page that loads a list of clients and
Here's a basic regex technique that I've never managed to remember. Let's say I'm
Here's a problem I ran into recently. I have attributes strings of the form

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.