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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:56:55+00:00 2026-05-31T18:56:55+00:00

I am trying to do this: arrCauses := APEX_UTIL.STRING_TO_TABLE(:P1_CAUSE); FOR c IN 1..arrCauses.count LOOP

  • 0

I am trying to do this:

arrCauses := APEX_UTIL.STRING_TO_TABLE(:P1_CAUSE);
FOR c IN 1..arrCauses.count LOOP
  INSERT INTO DT_EVENT_CAUSE (
  EVENT_ID,
  CAUSE_ID)

  VALUES (
  nextPK, c);
END LOOP;

or this

arrCauses := APEX_UTIL.STRING_TO_TABLE(:P1_CAUSE);
FOR c IN arrCauses.first..arrCauses.last LOOP
  INSERT INTO DT_EVENT_CAUSE (
  EVENT_ID,
  CAUSE_ID)

  VALUES (
  nextPK, c);
END LOOP;

Problem is…c is always just the count, so if the array is 1 item, a c of 1 will be inserted. If the array if 3 items, c’s of 1, 2 and 3 will be inserted. As opposed to actual values from the array. What am I doing wrong?!

  • 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-31T18:56:56+00:00Added an answer on May 31, 2026 at 6:56 pm

    Use the index to retrieve the value within your array:

     VALUES (
     nextPK, arrCauses(c));
    

    instead of

     VALUES (
     nextPK, c);
    

    😉

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

Sidebar

Related Questions

I am trying this query, but didn't work INSERT INTO single_user (location_home.id_location_home ) SELECT
Currently I'm trying this: $sql_words = array(select,update,set, from, where, and, order by,insert into,delete); echo
I'm trying this and getting an error. SELECT Count(*) FROM CASE @Type WHEN 'UserName'
By trying this use master go select * into #TempTable from sys.all_views select *
Im trying this, but when i press it it dont changes, it only displays
I'm trying this pattern: (r'^jobs/(?P<job_id>\d+)/$', job_handler) To work with jobs/ and jobs/{job_id}, but the
I'm trying this for almost two hours now, without any luck. I have a
I am trying this code: entLoop:for(var i:*in entities) { for(var i2:*in ignoreEntities) { if(entities[i].type==ignoreEntities[i2])
I'm trying this: {:id => 5, :foos => [1,2,3]}.each {|k,v| v.to_s} But that's returning
i get this error when trying this: ERROR method name expected. How should i

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.