Solved

ORA 1843 not a valid month

Posted on 2009-07-14
3
1,178 Views
Last Modified: 2013-12-19
I need to format the three dates in three different ways.
I am getting not valid month error.
Can you help? Thanks! Beth
SELECT 
PACKLIST.PACKLIST_NO, 
to_date(TRANSACTION_DATE, 'dd-mm-yyyy'), 
to_date(SCHEDULED_SHIP_DATE, 'mm-dd-yyyy'), 
to_date(ACTUAL_SHIPPED_DATE, 'mm-dd-yy'),
JOBCOST_UNITS * COST_PER_UNIT AS EXTENDED_COST
 
FROM PACKLIST, JOBCOST
 
WHERE PACKLIST.PACKLIST_NO = JOBCOST.PACKLIST_NO;

Open in new window

0
Comment
Question by:ba_trainer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 74

Accepted Solution

by:
sdstuber earned 500 total points
ID: 24853164
if the three columns are dates, use to_char instead of to_date


SELECT
PACKLIST.PACKLIST_NO,
to_char(TRANSACTION_DATE, 'dd-mm-yyyy'),
to_char(SCHEDULED_SHIP_DATE, 'mm-dd-yyyy'),
to_char(ACTUAL_SHIPPED_DATE, 'mm-dd-yy'),
JOBCOST_UNITS * COST_PER_UNIT AS EXTENDED_COST
FROM PACKLIST, JOBCOST
WHERE PACKLIST.PACKLIST_NO = JOBCOST.PACKLIST_NO;
0
 

Author Closing Comment

by:ba_trainer
ID: 31603436
they are - perfect!! thanks so much! Beth
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 24853198
glad I could help
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question