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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:47:24+00:00 2026-06-15T02:47:24+00:00

I need to assign many date value based on one date value by incrementing

  • 0

I need to assign many date value based on one date value by incrementing the date.

Following code is a sample. but it throws error. where i am wrong kindly advice.

   DECLARE
     issuedate date:='27-JAN-12';
     issuedate_1 date;
     issuedate_2 date;
     issuedate_3 date;
   BEGIN
     for cnt in 1..5
     loop
       issuedate_||cnt := issuedate+cnt;
       DBMS_OUTPUT.PUT_LINE(cnt);
       DBMS_OUTPUT.PUT_LINE( issuedate_1);
       DBMS_OUTPUT.PUT_LINE( issuedate_2);
       DBMS_OUTPUT.PUT_LINE( issuedate_3);
     end loop;
   END;
  • 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-15T02:47:25+00:00Added an answer on June 15, 2026 at 2:47 am

    you can’t form the variable name dynamically, create array of dates and increment and assign values.
    TRY THIS LINK

    issuedate_||cnt := issuedate+cnt;–problem is in BOLD part

    Sample :

    SQL>   declare
      2  
      3        type date_aa is table of date index by pls_integer;
      4        l_date_aa date_aa;
      5        temp date:= to_date('27-mar-2012');
      6        buckets number:=5;
      7     begin
      8      for elem in 1 .. buckets loop
      9    select temp+1 into temp from dual;
     10    l_date_aa(elem) := temp;
     11    dbms_output.put_line(l_date_aa(elem));
     12    end loop;
     13    end;
     14  /
    

    output:

    28-MAR-12
    29-MAR-12
    30-MAR-12
    31-MAR-12
    01-APR-12
    
    PL/SQL procedure successfully completed
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What I want to do is following. Inside a function, I need to assign
I need to assign a formatted date to a column in a data flow.
I need to assign channel for each schedule. There can be as many concurrent
I have a one to many relationship in my core data model. I need
I need a default value set and many different pages access and update..initially can
I need to assign values to properties through reflection, and it has been OK
I need to assign a specific color to a bar in ggplot bar plots.
I need to assign an active class to my main-level navigation rendered by wordpress.
I need to assign a variable which will be used to create the id
I am exporting datatable in MSEXCEL.I need to Assign MultipleLines in a cell in

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.