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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:00:40+00:00 2026-05-18T07:00:40+00:00

Hi lads I’m trying to automatize a partitioning process here, and well ren into

  • 0

Hi lads
I’m trying to automatize a partitioning process here, and well ren into something odd.
Why wouldnt’the following work?

create table flp_aa (cdate date, value varchar2(255))
PCTUSED    0
PCTFREE    10
INITRANS   1
MAXTRANS   255
STORAGE    (
            INITIAL          64M
           )
LOGGING
PARTITION BY RANGE (cdate)
(  
  PARTITION flp_aa_1010 VALUES LESS THAN (last_day(to_date('20101101', 'YYYYMMDD')))
    NOLOGGING
    NOCOMPRESS
    PCTFREE    10
    INITRANS   1
    MAXTRANS   255
    STORAGE    (
                INITIAL          64M
                NEXT             512K
                MINEXTENTS       1
                MAXEXTENTS       UNLIMITED
                PCTINCREASE      0
                BUFFER_POOL      DEFAULT
                )
)

The idea is to use last_day(to_date('20101101', 'YYYYMMDD')) so each pretty partition ends on the last day of that month and everybody is happy. However I get an ORA-14019 when trying to execute that code…

[UPDATE]

Darn odd:

This work:

  (...)
  PARTITION flp_aa_1010 VALUES LESS THAN (to_date('20101101', 'YYYYMMDD'))
  (...)

This doesn’t work:

  (...)
  PARTITION flp_aa_1010 VALUES LESS THAN (last_day(to_date('20101101', 'YYYYMMDD')))
  (...)

And this does not again:

  (...)
  PPARTITION flp_aa_1010 VALUES LESS THAN to_date(last_day(to_date('201010','YYYYMM'))))
  (...)

What the duck? which class did I miss here?
Isn’t the output of all these functions the same?

could anyone enlighten me?

cheers

f.

  • 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-18T07:00:40+00:00Added an answer on May 18, 2026 at 7:00 am

    As the link you posted says:

    partition bound element must be one
    of: string, datetime or interval
    literal, number, or MAXVALUE

    A function call (LAST_DAY) is not a string, datetime or interval
    literal, number, or MAXVALUE. True, TO_DATE is a function call, but this is allowed as an exception because traditionally it was the only way to generate a DATE literal (you can now use the ANSI format DATE ‘2010-11-26’ but not a lot of people know that). See documentation.

    However, at the point where you generate the value ‘20101101’, you could apply LAST_DAY and use the result instead of that – something like:

    '... VALUES LESS THAN (' || TO_CHAR (LAST_DAY (...), 'YYYYMMDD') || ')...'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Goodmorning lads, First of all - R.I.P TPB! Welcome malaysiabay.org for the Dutchies <3
had a bit of confusion going around in work earlier. Thought id run it
Goodmorning coding lads, I'm writing a small regex too clean filenames from special characters
double temp; temp = (double)Convert.ToDouble(1234.5678); Hey Lads and Ladies, I can't for the life
Using the HTML Form Elements, I would like to allow an input of numeric
I am having problems finding the solution to two errors on a web site
My app is built in a fashion similar to Facebook in that it uses
import time word = {success:0, desire:0, effort:0, ...} def cleaner(x): dust = ,./<>?;''[]{}\=+_)(*&^%$#@!`~ for
I have an xml file that contains this data: `<?xml version=1.0 encoding=UTF-8?> <WordList> <Words
I can't figure out a discrepancy between the time it takes for the Contains

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.