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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:17:53+00:00 2026-06-17T08:17:53+00:00

In the below procedure, I want to insert multiple id records for approval_log_id column

  • 0

In the below procedure, I want to insert multiple id records for approval_log_id column which is a foreign key for approval_redirect_log table.

I am getting approval_log_id from another table approval_log.The select query for the first column returns multiple ids which should be inserted along with other data. Other columns data has to be repeated for all the ids.

What am I doing wrong here for the first column?

    PROCEDURE REDIRECT_APPROVAL_LOG_INSERT(
vAPPROVAL_LOG_ID approval_redirect_log.approval_log_id%type,
vREDIRECTED_FROM APPROVAL_REDIRECT_LOG.redirected_from%type,
vREDIRECTED_TO APPROVAL_REDIRECT_LOG.redirected_to%type,
vREDIRECTED_BY approval_redirect_log.redirected_by%type) AS

  BEGIN

   INSERT INTO APPROVAL_REDIRECT_LOG(
     APPROVAL_LOG_ID,
     REDIRECTED_FROM,
     REDIRECTED_TO,
     REDIRECTED_BY,
     REDIRECTED_ON) 
  VALUES
  (select approval_log_id 
   from approval_log 
   where accept_reject is null and approval_recid=vREDIRECTED_FROM
   ,
  vREDIRECTED_FROM,
  vREDIRECTED_TO,
  vREDIRECTED_BY,
  sysdate
  );

  END REDIRECT_APPROVAL_LOG_INSERT;
  • 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-17T08:17:53+00:00Added an answer on June 17, 2026 at 8:17 am

    You should:

    INSERT INTO APPROVAL_REDIRECT_LOG(
         APPROVAL_LOG_ID,
         REDIRECTED_FROM,
         REDIRECTED_TO,
         REDIRECTED_BY,
         REDIRECTED_ON) 
    select    approval_log_id, 
              vREDIRECTED_FROM,
              vREDIRECTED_TO,
              vREDIRECTED_BY,
              sysdate
    from approval_log 
    where  
         accept_reject is null 
         and approval_recid=vREDIRECTED_FROM;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a stored procedure to update multiple records based on a table variable
Below is the procedure which i have taken from net..but while executing its giving
How can I return List<personel> data type from below procedure. If I press F5
my stored procedure is like below, select T.TranNo,(Select Accountname from Accountable where AccountCode =T.tranAccountCode)
I am having the below statement from stored procedure. It's giving Insufficient Privileges. But
I have the sql query below. I want to take the results and insert
I want to fetch data from xml in stored procedure, but it returns null
I'm using a stored procedure to update\insert data into a table using MERGE. One
I have a query which is working fine: BULK INSERT ZIPCodes FROM 'e:\5-digit Commercial.csv'
Below is my stored procedure. I want use stored procedure select all row of

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.