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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:50:55+00:00 2026-06-12T04:50:55+00:00

Ok this is a similar problem like the one I had before but it

  • 0

Ok this is a similar problem like the one I had before but it has the requirment that it needs to be a view with 1 variable and it needs to be as simple as possible.
I need a view that generates a list of dates within a given month (that is the variable).

Here is what I have so far:

create view monthview(datesetter) as (   
select
to_date(to_date(datesetter),'MM.YYYY')-1 + level as DateRange
from
dual
where
(to_date(to_date(datesetter),'MM.YYYY')-1+level) <= sysdate
connect by level<=31);

and the view should than be called by something like:

select * from monthview where datesetter='02.2008';

and then generate a list like

01.02.2007
02.02.2007

and so on

It either tells me that I can’t compile the view due to the fact that there is a mistake when I use datesetter or it compiles the view but then it tells me thata there is a non numeric value where a numeric one is needed when I use ‘datesetter’ ….

Thanks for any ideas or help

  • 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-12T04:50:56+00:00Added an answer on June 12, 2026 at 4:50 am

    try a pipelined function:

    create or replace type date_array_type as table of date;
    
    create or replace function monthview (datesetter varchar2) return date_array_type
    pipelined as
    
    cursor c is 
    select to_date(level || '.' || datesetter , 'dd.mm.yyyy') dt
    from dual
    connect by level <= to_number(to_char(
      last_day(to_date(datesetter , 'mm.yyyy')), 'dd'));
    
    begin
    
    for r in c loop
    
      pipe row(r.dt);
    
    end loop;
    
    return;
    
    end;
    

    Now you can use it like this:

    select * from table( monthview('03.2012'));
    

    Here is a fiddle

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

Sidebar

Related Questions

I have looked around SO for similar questions, but it seems that this has
I have checked this similar question, but the suggestions did not solve my problem:
Similar to this question: link However I have already mastered that. My problem is
Sorry I know similar question have been asked many times before but like most
My Problem is similar to this one: Error on dismissing ProgressDialog in AsyncTask I
I had a very similar problem before where i wanted to show random xml
I notice this thread: Fastish Python/Jython IPC , and I have a similar problem,
This is similar to an earlier problem I was having which you guys solved
This problem is similar to when creating alternate colour table-rows, only we are dealing
I have a cross-tab report which similar to this Problem is when there are

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.