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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:28:10+00:00 2026-06-05T17:28:10+00:00

I’m using Oracle 11g Schema I want to select the month and day from

  • 0

I’m using Oracle 11g Schema

I want to select the month and day from a date concatenate it and put it into a column.

The syntax I have here makes sense but its throwing an error of..

INSERT INTO OB_SELECT_LST12_SPG WED 
  VALUES (((TO_CHAR(TO_DATE('RET_DATE', MM))||( TO_CHAR(TO_DATE('RET_DATE', DD)));

“SQL Error: ORA-00907: missing right parenthesis”

Any help is greatly appreciated.
Thanks.

  • 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-05T17:28:13+00:00Added an answer on June 5, 2026 at 5:28 pm

    Some points first…

    1. Your table name has a space in in
    2. Your not enough columns error is caused by you having more than one column in the table
    3. You really shouldn’t be doing this at all
    4. If ret_date is a column don’t encapsulate it in quotation marks (') as you won’t be able to convert the string 'ret_date' into a date.

    However, assuming ret_date is a string that looks like 13-06-2012

    insert into ob_select_lst12_spg_wed (my_column)
    values(to_char(to_date(:ret_date,'dd-mm-yyyy'),'mmdd'));
    

    If ret_date is a date data-type then you can remove the inner conversion.

    insert into ob_select_lst12_spg_wed (my_column)
    values(to_char(:ret_date,'mmdd'));
    

    to_char and to_date both make use of datetime format models, which have a number of options.


    Please don’t do this though. Always store dates as dates


    From your comments ret_date is a date and the column wed is a character. You’re getting the error bind variable not declared because you haven’t specified the variable. I’m going to assume that ret_date is in another table as it’s a date, in which case lose the values key-word and insert directly from that table:

    insert into ob_select_lst12_spg (wed)
    select to_char(ret_date,'mmdd')
      from the_other_table
    

    This shouldn’t be required though, you can always convert a date into whatever you want on exit from the database. If you don’t store it as a date in the database then it’s easy for errors and incorrect values to creep in. I personally would change the column wed to a date, in which case your query becomes the very simple:

    insert into ob_select_list12_spg (wed)
    select ret_date
      from the_other_table
    

    You can then use the correct datetime format model for your needs when selecting from the database.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,

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.