JDBC Error with DATE format

Hello,
we had created a scenario file to jdbc. while sending file to Oracle DB, it shows error as "ORA-01861: literal does not match format string". we checked the literals and white spaces. still we have same problem. so i have doubt on DATE format. we are sending date from PI system as yyyyMMdd which is not supported by Oracle i think. So please provide the DATE format accepted by Oracle and how to pass from SAP PI mapping. it will be appreciable if provide Steps to do in mapping or UDF code sample.
Also in response status we get the error "ORA-00917: missing comma ".  So plz let me know how to solve this issue.
Thanks in Advance.

Hi
The date format for oracle is dd-MON-yyyy.
Please refer to blog below
/people/santhosh.kumarv/blog/2008/10/10/life-is-all-about-days-date-in-xi
/people/sarvesh.singh3/blog/2009/02/13/yes-it-is-possible-with-datetrans-function
Regards,
Deepak.
Edited by: Deepak  Shah on May 21, 2010 3:35 PM

Similar Messages

  • Sql loader error with date format

    Hi everyone,
    I have table and have a data in one coulmn RECORDED_DATE like '20090224' and my client is asking me to load this coulmn data in 'yyyymmdd' format.I am strucked up with my ideas.I used to_date('20090124','yyyymmdd') in control file.but it is also not working Here it is my control file
    LOAD DATA
    INFILE 'C:\xxxx\SQLLDR\HE data\HE_data_Feb.txt'
    BADFILE 'C:\xxxx\SQLLDR\HE data.bad'
    DISCARDFILE 'C:\xxxx\SQLLDR\HE data.dsc'
    INTO TABLE LSCCMGR.FASTPAY_HE_DATA
    REPLACE
    fields terminated by X'09'
    TRAILING NULLCOLS
    (RECORDED_DATE "TO_DATE(:RECORDED_DATE,'mm/dd/yyyy')"
    AGENT_ID
    MEASURE
    TRANSACTIONS
    FEES
    If i excute like this i am getting the error like
    Record 1: Rejected - Error on table LSCCMGR.FASTPAY_HE_DATA, column RECORDED_DATE.
    ORA-01843: not a valid month
    Getting for all records,what i need o change to get the RECORDED_DATE as dateformat.Ple any one help me in this issue to resolve
    How can we perform this using sql loader pls let me know,Thanks in advance.
    Sravan

    Hi,
    >>(RECORDED_DATE "TO_DATE(:RECORDED_DATE,'mm/dd/yyyy')"
    *Change this line to*
    (RECORDED_DATE "TO_DATE(:RECORDED_DATE,'yyyymmdd')"Regards,

  • Issue with Date Format

    Hi All,
    I m facing an issue with Date format in the prompt. I have used date presentation variables in my column formula as shown below:
    FILTER("SKU Order Details"."Fulfilled Quantity" USING Time."Calendar Date" <= DATE '@{todate}{2900-01-01}')
    The report returns data when I don't select any date range for start & end date prompts on the page. But when I select the start & end date values in the prompt, I m getting the following error:
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46047] Datetime value 10/22/2009 12:00:00 AM from 10/22/2009 12:00:00 AM does not match the specified format. (HY000)
    I included the following formulas for start & end date prompts:
    Start Date prompt: case when 1=2 then License."Ips Creation Date" else cast ('1.1.1900' as date) end
    End Date prompt: case when 1=2 then License."Ips Creation Date" else cast ('1.1.2900' as date) end
    Can you please help me resolve the issue.
    Thanks,
    Kartik

    Hi Nico,
    I tried putting the format that you mentioned, I m getting an error message.
    My prompts have the following formula :
    Start: case when 1=2 then License."Creation Date" else cast('1.1.1900' as DATE) end
    End: case when 1=2 then Time."Calendar Date" else cast('1.1.2900' as DATE) end
    My column formula has the following syntax:
    FILTER("SKU Order Details"."Fulfilled Quantity" USING Time."Calendar Date" between DATE '@{start}{1900-01-01}' AND DATE '@{end}{2999-01-01}')
    Error Message:
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46047] Datetime value 11/17/2009 from 11/17/2009 does not match the specified format. (HY000)
    Can you please let me know if something needs to be changed.
    Thanks,
    Kartik

  • SQL Loader with date formatting

    Hi,
    I'm trying to get sql loader to insert a date into a column. After much browsing, reading trial and error I still get an array of errors.
    I'm using oracle XE
    my control file looks like this
    LOAD DATA
    INFILE 'posmeters/meters.csv'
    INTO TABLE position_meters
    FIELDS terminated by ","
    ID CONSTANT '0',
    POSITION_ID,
    DATETIME DATE "DD/MM/YYYY HH24:MI:SS",
    CASH_IN,
    CASH_OUT,
    NOTES_IN,
    CHANGE_OUT,
    WINNINGS,
    VTP,
    REFILL,
    TOKEN_IN,
    TOKEN_OUT,
    ELEC_PAY,
    ELEC_CREDIT,
    REMOTE_PAY,
    REMOTE_CREDIT,
    INSERT_TS EXPRESSION "TO_CHAR(SYSDATE, 'DD/MM/YYYY HH24:MI:SS')",
    FIFTY_PND,
    TWENTY_PND,
    TEN_PND,
    FIVE_PND,
    TWO_PND,
    ONE_PND,
    FIFTY_P,
    TWENTY_P,
    TEN_P,
    FIVE_P
    It is the DATETIME field which gives me grief. I have a test data file that looks like this
    0,1010,29/09/2011 10:23:24,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24
    and my table is defined as follows
    ID NUMBER NOT NULL,
    POSITION_ID NUMBER,
    DATETIME TIMESTAMP(6) DEFAULT localTIMESTAMP NOT NULL,
    CASH_IN NUMBER,
    CASH_OUT NUMBER,
    NOTES_IN NUMBER,
    CHANGE_OUT NUMBER,
    WINNINGS NUMBER,
    VTP NUMBER,
    REFILL NUMBER,
    TOKEN_IN NUMBER DEFAULT (0) NOT NULL,
    TOKEN_OUT NUMBER DEFAULT (0) NOT NULL,
    ELEC_PAY NUMBER DEFAULT (0) NOT NULL,
    ELEC_CREDIT NUMBER DEFAULT (0) NOT NULL,
    REMOTE_PAY NUMBER DEFAULT (0) NOT NULL,
    REMOTE_CREDIT NUMBER DEFAULT (0) NOT NULL,
    INSERT_TS TIMESTAMP(6) DEFAULT (localtimestamp) NOT NULL,
    FIFTY_PND NUMBER DEFAULT 0,
    TWENTY_PND NUMBER DEFAULT 0,
    TEN_PND NUMBER DEFAULT 0,
    FIVE_PND NUMBER DEFAULT 0,
    TWO_PND NUMBER DEFAULT 0,
    ONE_PND NUMBER DEFAULT 0,
    FIFTY_P NUMBER DEFAULT 0,
    TWENTY_P NUMBER DEFAULT 0,
    TEN_P NUMBER DEFAULT 0,
    FIVE_P NUMBER DEFAULT 0
    I have tried defining the control file with
    DATETIME DATE "DD/MM/YYYY HH24:MI:SS",
    DATETIME EXPRESSION "TO_DATE(:DATETIME, 'DD/MM/YYYY HH24:MI:SS')",
    DATETIME EXPRESSION "TO_TIMESTAMP(:DATETIME, 'DD/MM/YYYY HH24:MI:SS')",
    I get errors such as
    Record 1: Rejected - Error on table "SITE_MAIN"."POSITION_METERS", column DATETIME.
    ORA-01861: literal does not match format string
    SQL*Loader-291: Invalid bind variable DATETIME in SQL string for column DATETIME.
    any help would greatfully appreciated.

    It seems that the problem was caused by the constant at the beginning of the record and had nothing to do with date formats.
    My control file now looks like this
    LOAD DATA
    INFILE 'posmeters/meters.csv'
    APPEND INTO TABLE position_meters
    FIELDS terminated by ","
    POSITION_ID          ,
    DATETIME      date "DD/MM/YYYY HH24:MI:SS",
    CASH_IN          ,
    CASH_OUT          ,
    NOTES_IN          ,
    CHANGE_OUT          ,
    WINNINGS          ,
    VTP               ,
    REFILL          ,
    TOKEN_IN          ,
    TOKEN_OUT          ,
    ELEC_PAY          ,
    ELEC_CREDIT          ,
    REMOTE_PAY          ,
    REMOTE_CREDIT     ,
    INSERT_TS      "TO_TIMESTAMP(SYSDATE, 'DD/MM/YYYY HH24:MI:SS')",
    FIFTY_PND          ,
    TWENTY_PND          ,
    TEN_PND          ,
    FIVE_PND          ,
    TWO_PND          ,
    ONE_PND          ,
    FIFTY_P          ,
    TWENTY_P          ,
    TEN_P          ,
    FIVE_P          
    all is good :o)

  • Problem with date format when ask prompt web-intelligence

    Bo XIR2 with 5 SP. Instaled on Windows 2003 with support Russian.
    Inside BO every labels, buttons - use russian. But when invoke web-report and Prompt appear there is problem with date format.
    Looks like korean format of date 'jj.nn.aaa H:mm:ss'.  I see system settings of date in Win .. everything right
    What i have to do?
    Where i can change format date for bo?

    GK, try this...
    decode(instr(packagename.functionname(param1 ,param2),'2400'), 0, to_date(to_char(to_date(rtrim(packagename.functionname(param1 ,param2),'(PT)'), 'Month dd, yyyy "at" hh24mi'),'mm/dd/yyyy hh24mi'),'mm/dd/yyyy hh24mi'),
                                                                      to_date(to_char(to_date(rtrim(packagename.functionname(param1 ,param2),'(PT)'), 'Month dd, yyyy "at" "2400"')+1,'mm/dd/yyyy "0000"'),'mm/dd/yyyy "0000"'))-Marilyn

  • Problem with Date format

    Got one more problem Merilyn and Radhakrishnan...
    Regarding the soln y provided me earler with the thread "Problem with date format"...
    What is happening is....I am able to change the 2400 to 0000 but when it is changed from 2400 on jan 1st to 0000 the hour is changing but not the date....the date still remains as jan 1st instead of jan 2nd....
    Eg: Jan 1st 2400 -- changed to -- jan1st 0000
    instead of jan 2nd 0000
    Could you please help me in this issue...
    Thanks,
    GK

    GK, try this...
    decode(instr(packagename.functionname(param1 ,param2),'2400'), 0, to_date(to_char(to_date(rtrim(packagename.functionname(param1 ,param2),'(PT)'), 'Month dd, yyyy "at" hh24mi'),'mm/dd/yyyy hh24mi'),'mm/dd/yyyy hh24mi'),
                                                                      to_date(to_char(to_date(rtrim(packagename.functionname(param1 ,param2),'(PT)'), 'Month dd, yyyy "at" "2400"')+1,'mm/dd/yyyy "0000"'),'mm/dd/yyyy "0000"'))-Marilyn

  • Problem with date format dd/mm/yyyy. But I need to convert yyyy-mm-dd.

    Dear friends,
    I have the problem with date format. I receiving the date with the format dd/mm/yyyy. But I can upload to MySQL only in the format of yyyy-mm-dd.
    how should I handle this situation, for this I've created these code lines.But I have some problem with these line. please help me to solve this problem.
    String pattern = "yyyy-mm-dd";
    SimpleDateFormat format = new SimpleDateFormat(pattern);
    try {
    Date date = format.parse("2006-02-12");
    System.out.println(date);
    } catch (ParseException e) {
    e.printStackTrace();
    System.out.println(format.format(new Date()));
    this out put gives me Tue Apr 03 00:00:00 IST 2007
    But I need the date format in yyyy-mm-dd.
    regards,
    maza
    thanks in advance.

    Thanks Dear BalusC,
    I tried with this,
    rs.getString("DATA_SCAD1")// where the source from .xls files
    String pattern = "yyyy-MM-dd";
    SimpleDateFormat format = new SimpleDateFormat(pattern);
    try {
    Date date = format.parse("DATA_SCAD1");
    System.out.println(date);
    } catch (ParseException e) {
    e.printStackTrace();
    System.out.println(format.format(new Date()));
    this out put gives me Tue Apr 03 00:00:00 IST 2007
    But I want to display the date format in yyyy-mm-dd.
    regards,
    maza

  • SSRS is weird with date format

    hello everyone,
    I've got the weirdest problem.
    At first it was the calendar in internet exporer showing the dutch format (which i want). After choosing the date i try to view the report. It wil tell me the date isnt in the right format.  So for example. 22-02-2015 is wrong and should be 02-22-2015.
    For the normal user this is annoying enough and i dont understand why the datepicker acts different than the report wants.
    But now even stanger. I wanted to put a default date in my variable so i can test a bit easier. So i fill in 31-12-2015 and its accepted. But when i run the report, it tells me that the format is wrong. Soooooo. I changed the default value to 12-31-2015
    (the english format)..... BUT!!! now the variable default value isnt accepted because its not in the right format.
    Can someone please tell me how i can avoid format changes between browsers/platforms/computers or what so ever.
    there is 1 format i want and nothing else. dd-MM-yyyy thats the way and nothing else.

    Hi Fibre1980,
    As per my understanding, when you preview the report, you hope that the date is displayed in the format dd-MM-yyyy in calendar, right?
    In Reporting Services, the format of date in calendar control depends on your client machines language and regional settings. If you want to display date in the format dd-MM-yyyy, you can get parameter values from a query, so that values get populated in a
    dropdown list and displayed in your required format.
    Here is a relevant thread you can reference:
    https://social.technet.microsoft.com/Forums/en-US/6e719c7b-cfd5-4f0d-a530-f9710704446c/trouble-searching-with-date-format-usuk-formatting?forum=sqlreportingservices
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.
    Wendy Fu
    TechNet Community Support

  • Trouble with date format

    Hello,
    i need some help with date formats. I am using JDeveloper 11g and am trying to write some SQL commands.
    When i enter the following, everything is working correctly.
    ResultSet query = st.executeQuery("select * from DB.TABLE where DATE > '01-01-2000'");
    I need to make it work so that date can be used from a jtextarea.
    String inputData =jTextArea1.getText();
    ResultSet query = st.executeQuery("select * from DB.TABLE where DATE > " +inputData);
    Query does not return anything.
    Do i need to convert the value of inputData? What other problems could there be?
    TY
    Edited by: user10956166 on Apr 1, 2009 4:08 AM

    Correct. Oracle will implicitly convert the date as shown below (see Predicate Information)
    SQL > explain plan for select * from test where modified_date > '01/01/2008 12:00:00';
    Explained.
    SQL > select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 3461732445
    | Id  | Operation         | Name  | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |       |   677 |   105K|     6   (0)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| TEST  |   677 |   105K|     6   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter("MODIFIED_DATE">TO_DATE(' 2008-01-01 12:00:00',
                  'syyyy-mm-dd hh24:mi:ss'))Don't forget to use parameterized queries (a.k.a. bind variables)!
    HTH!

  • Error in date format returned in FM: RH_READ_OBJECT

    Hi All,
    I found an error in date format returned in field OBEG of FM: RH_READ_OBJECT.
    It returns: 20112804 and it should be 20110428 (this is Sap internal date format)
    It is strange because it does not happen all the time just in some particular scenarios.
    Do you have any idea about this issue? Is there any note related to this?
    Below a link to a debug screenshot:
    [http://tinypic.com/view.php?pic=1zegppt&s=7]
    Thanks!

    Hi Viji and thanks for your answer!
    I checked checked user default settings and we have the same date format as anther user who is working ok.
    Also I do not think it is a user settings related error because this is the result returned by a standard FM in debug mode so the value in the screenshot should be in internal Sap format which is: YYYYMMDD.
    Any other idea on this?
    Thanks!

  • Pls Help with date format picture ends ......error

    Hi Everyone,
       I am getting the following error when I run my crystal report.
    Failed to retrieve data from the database.
    Details: HY000:[DataDirect][ODBC Oracle driver][Oracle]ORA-01830: date format picture ends before converting entire input string
    [Database Vendor Code: 1830]
       I am using SQL Command for my report and in the command  my date fields are of "Date" datatype.
       I am using Crystal Reports XI R2,driver - CR Oracle ODBC Driver 5.1
       Any help is greatly appreciated.
    Thanks in advance
    My SQL Command is as follows:
    <
    with MAXNEWSTAT as
    (select
    /--Added by HAN--/
    HRHISTORY.COMPANY,
    HRHISTORY.EMPLOYEE,
    MAX(HRHISTORY.ACT_OBJ_ID) ACT_OBJ_ID
    FROM
    LAWSON.HRHISTORY
    WHERE
    HRHISTORY.FLD_NBR=20
    and TO_DATE(HRHISTORY.DATE_STAMP)
        >= TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,-1)),'YYYY/MM')||'/01'),'YYYY/MM/DD') 
        AND  TO_DATE(HRHISTORY.DATE_STAMP) <= (TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,0)),'YYYY/MM')||'/01'),'YYYY/MM/DD'))-1
    /--Added by HAN--/
        GROUP BY COMPANY,
        EMPLOYEE),
    NEWSTAT AS
    (SELECT
    /--Added by HAN--/
    HRHISTORY.COMPANY,
    HRHISTORY.EMPLOYEE,
    HRHISTORY.A_VALUE,
    HRHISTORY.DATE_STAMP,
    HRHISTORY.BEG_DATE,
    HRHISTORY.ACT_OBJ_ID NS_OBJ_ID,
    HRHISTORY.SEQ_NBR
    FROM
    LAWSON.HRHISTORY
    INNER JOIN LAWSON.MAXNEWSTAT
    ON
    /--Added by HAN--/
    HRHISTORY.COMPANY = MAXNEWSTAT.COMPANY
    /--Added by KAM--/
    AND HRHISTORY.EMPLOYEE = MAXNEWSTAT.EMPLOYEE
    AND HRHISTORY.ACT_OBJ_ID = MAXNEWSTAT.ACT_OBJ_ID
    WHERE
    HRHISTORY.FLD_NBR=20
    and TO_DATE(HRHISTORY.DATE_STAMP)
        >= TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,-1)),'YYYY/MM')||'/01'),'YYYY/MM/DD') 
        AND  TO_DATE(HRHISTORY.DATE_STAMP) <= (TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,0)),'YYYY/MM')||'/01'),'YYYY/MM/DD'))-1
    PREVSTATID AS
    (SELECT
    /--Added by HAN--/
    HRHISTORY.COMPANY,
    HRHISTORY.EMPLOYEE,
    MAX(HRHISTORY.ACT_OBJ_ID)OBJ_ID
    FROM
    LAWSON.HRHISTORY
        INNER JOIN LAWSON.NEWSTAT
    /--Added by HAN--/
        ON HRHISTORY.COMPANY = NEWSTAT.COMPANY
        AND HRHISTORY.EMPLOYEE = NEWSTAT.EMPLOYEE
    WHERE
    HRHISTORY.FLD_NBR=20
    AND TO_DATE(HRHISTORY.BEG_DATE)
    < to_date(NEWSTAT.BEG_DATE)
    GROUP BY
    /--Added by HAN--/
    HRHISTORY.COMPANY,
    HRHISTORY.EMPLOYEE
    PREVSTAT AS
    (SELECT
    /--Added by HAN--/
    HRHISTORY.COMPANY,
    HRHISTORY.EMPLOYEE,
    HRHISTORY.A_VALUE A_VALUE,
    HRHISTORY.DATE_STAMP DATE_STAMP,
    HRHISTORY.BEG_DATE BEG_DATE,
    HRHISTORY.ACT_OBJ_ID OBJ_ID,
    HRHISTORY.SEQ_NBR SEQ_NBR
    FROM
    LAWSON.HRHISTORY
        INNER JOIN LAWSON.PREVSTATID
    /--Added by HAN--/
        ON HRHISTORY.COMPANY = PREVSTATID.COMPANY
        AND HRHISTORY.EMPLOYEE = PREVSTATID.EMPLOYEE
    WHERE
    HRHISTORY.FLD_NBR=20 AND
    HRHISTORY.ACT_OBJ_ID = PREVSTATID.OBJ_ID
    MAXPERSACTHST AS
    (SELECT
    PERSACTHST.EMPLOYEE,
    /--Added by KAM--/
    PERSACTHST.COMPANY,
    MAX(PERSACTHST.DATE_STAMP)DATE_STAMP
    FROM
    LAWSON.PERSACTHST
    WHERE
    (PERSACTHST.ACTION_CODE='LOASTATUS' OR PERSACTHST.ACTION_CODE='STATUS')
    AND TO_DATE(PERSACTHST.DATE_STAMP)
        >= TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,-1)),'YYYY/MM')||'/01'),'YYYY/MM/DD') 
        AND  TO_DATE(PERSACTHST.DATE_STAMP) <= (TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,0)),'YYYY/MM')||'/01'),'YYYY/MM/DD'))-1
    GROUP BY PERSACTHST.EMPLOYEE,
    /--Added by KAM--/
    PERSACTHST.COMPANY
    CHANGELIST AS   
    (SELECT
    PERSACTHST.EMPLOYEE,
    /--Added by KAM--/
    PERSACTHST.COMPANY,
    PERSACTHST.ACTION_CODE,
    PERSACTHST.REASON_01,
    PERSACTHST.DATE_STAMP,
    PERSACTHST.EFFECT_DATE,
    PERSACTHST.REASON_02,
    PREVSTAT.A_VALUE PS_A_VALUE,
    PREVSTAT.DATE_STAMP PS_HR_DATE_STAMP,
    PREVSTAT.BEG_DATE PS_HR_BEG_DATE,
    PREVSTAT.OBJ_ID PS_HR_OBJ_ID,
    PREVSTAT.SEQ_NBR PS_HR_SEQ_ID,
    NEWSTAT.A_VALUE NS_A_VALUE,
    NEWSTAT.DATE_STAMP NS_DATE_STAMP,
    NEWSTAT.BEG_DATE NS_BEG_DATE,
    NEWSTAT.NS_OBJ_ID,
    NEWSTAT.SEQ_NBR NS_SEQ_NBR
    FROM
    LAWSON.PERSACTHST PERSACTHST
                        INNER JOIN LAWSON.PREVSTAT
                       ON PERSACTHST.EMPLOYEE=PREVSTAT.EMPLOYEE
                       /--Added by KAM--/
                       AND PERSACTHST.COMPANY = PREVSTAT.COMPANY
                       INNER JOIN LAWSON.NEWSTAT
                       ON PERSACTHST.EMPLOYEE = NEWSTAT.EMPLOYEE
                      /--Added by KAM--/
                       AND PERSACTHST.COMPANY = NEWSTAT.COMPANY
                       INNER JOIN LAWSON.MAXPERSACTHST
                       ON PERSACTHST.EMPLOYEE = MAXPERSACTHST.EMPLOYEE
                      /--Added by KAM--/
                         AND PERSACTHST.COMPANY = MAXPERSACTHST.COMPANY
    WHERE
    (PERSACTHST.ACTION_CODE='LOASTATUS' OR PERSACTHST.ACTION_CODE='STATUS')
    AND NEWSTAT.A_VALUE <> PREVSTAT.A_VALUE
    AND MAXPERSACTHST.DATE_STAMP = PERSACTHST.DATE_STAMP
    PAEMPPOSENDDATE AS
    (SELECT
      PAEMPPOS.EMPLOYEE,
      PAEMPPOS.COMPANY,
      CASE
      WHEN PAEMPPOS.END_DATE = TO_DATE('1700,01,01','YYYY,MM,DD')
             THEN to_date(SYSDATE + 1,'YYYY,MM,DD')
           ELSE PAEMPPOS.END_DATE 
      END END_DATE,
      PAEMPPOS.EFFECT_DATE
      FROM LAWSON.PAEMPPOS),
    CURRFTE AS
    (SELECT
      PAEMPPOS.EMPLOYEE,
    /--Added by KAM--/
      PAEMPPOS.COMPANY,
      PAEMPPOS.FTE CURR_FTE,
      PAEMPPOS.EFFECT_DATE,
      PAEMPPOSENDDATE.END_DATE  
    FROM
    LAWSON.PAEMPPOS
    INNER JOIN LAWSON.NEWSTAT
    ON (PAEMPPOS.EMPLOYEE = NEWSTAT.EMPLOYEE)
    /--Added by KAM--/
    AND (PAEMPPOS.COMPANY = NEWSTAT.COMPANY)
    INNER JOIN LAWSON.PAEMPPOSENDDATE
    ON PAEMPPOS.EMPLOYEE = PAEMPPOSENDDATE.EMPLOYEE
    /--Added by KAM--/
    AND PAEMPPOS.COMPANY = PAEMPPOSENDDATE.COMPANY
    AND PAEMPPOS.EFFECT_DATE=PAEMPPOSENDDATE.EFFECT_DATE
    WHERE
      (PAEMPPOSENDDATE.EFFECT_DATE <= NEWSTAT.BEG_DATE AND PAEMPPOSENDDATE.END_DATE >= NEWSTAT.BEG_DATE)
    PREVFTE AS
    (SELECT
      PAEMPPOS.EMPLOYEE,
    /--Added by KAM--/
      PAEMPPOS.COMPANY,
      PAEMPPOS.FTE PREV_FTE,
    PAEMPPOSENDDATE.END_DATE 
    FROM
    LAWSON.PAEMPPOS
    INNER JOIN LAWSON.NEWSTAT
    ON (PAEMPPOS.EMPLOYEE = NEWSTAT.EMPLOYEE)
    /--Added by KAM--/
    AND (PAEMPPOS.COMPANY = NEWSTAT.EMPLOYEE)
    INNER JOIN LAWSON.PAEMPPOSENDDATE
    ON (PAEMPPOS.EMPLOYEE = PAEMPPOSENDDATE.EMPLOYEE)
    /--Added by KAM--/
    AND (PAEMPPOS.COMPANY = PAEMPPOSENDDATE.COMPANY)
    AND (PAEMPPOS.EFFECT_DATE = PAEMPPOSENDDATE.EFFECT_DATE)
    WHERE
      PAEMPPOS.EFFECT_DATE <= (NEWSTAT.BEG_DATE-1)AND  PAEMPPOSENDDATE.END_DATE >= (NEWSTAT.BEG_DATE -1)
    SELECT DISTINCT
    EMPLOYEE.EMPLOYEE,
    EMPLOYEE.DEPARTMENT,
    EMPLOYEE.PROCESS_LEVEL,
    EMPLOYEE.EMP_STATUS,
    EMPLOYEE.FIRST_NAME,
    EMPLOYEE.LAST_NAME,
    EMPLOYEE.MIDDLE_INIT,
    EMPLOYEE.POSITION,
    PAPOSITION.DESCRIPTION,
    CHANGELIST.PS_A_VALUE,
    /--Added by KAM--/
    CHANGELIST.COMPANY,
    CHANGELIST.PS_HR_DATE_STAMP,
    CHANGELIST.PS_HR_BEG_DATE,
    CHANGELIST.PS_HR_OBJ_ID,
    CHANGELIST.NS_A_VALUE,
    CHANGELIST.NS_DATE_STAMP,
    CHANGELIST.NS_OBJ_ID,
    CHANGELIST.ACTION_CODE,
    CHANGELIST.REASON_01,
    CHANGELIST.REASON_02,
    CHANGELIST.DATE_STAMP PERSACTSDATESTAMP,
    CHANGELIST.EFFECT_DATE PERSACTEFFDATE,
    DEPTCODE.R_NAME DEPTNAME,
    PRSYSTEM.R_NAME PLNAME,
    PREVFTE.PREV_FTE,
    CURRFTE.CURR_FTE,
    CHANGELIST.NS_BEG_DATE,
    PGSELECT.GROUP_NAME,
    PAEMPLOYEE.SENIOR_DATE
    FROM
    LAWSON.CHANGELIST
                      INNER JOIN LAWSON.EMPLOYEE
                     ON (EMPLOYEE.EMPLOYEE = CHANGELIST.EMPLOYEE)
    /--Added by KAM--/
                     AND (EMPLOYEE.COMPANY = CHANGELIST.COMPANY)
                     INNER JOIN LAWSON.DEPTCODE
                     ON ((EMPLOYEE.COMPANY=DEPTCODE.COMPANY)
                     AND (EMPLOYEE.PROCESS_LEVEL=DEPTCODE.PROCESS_LEVEL)
                     AND (EMPLOYEE.DEPARTMENT=DEPTCODE.DEPARTMENT))
                     INNER JOIN LAWSON.PRSYSTEM
                     ON ((EMPLOYEE.COMPANY=PRSYSTEM.COMPANY)
                     AND(EMPLOYEE.PROCESS_LEVEL=PRSYSTEM.PROCESS_LEVEL))
                     LEFT OUTER JOIN LAWSON.PREVFTE
                       ON (CHANGELIST.EMPLOYEE=PREVFTE.EMPLOYEE)
    /--Added by KAM--/                
                     AND (CHANGELIST.COMPANY=PREVFTE.COMPANY)
                     LEFT OUTER JOIN LAWSON.CURRFTE
                     ON (CHANGELIST.EMPLOYEE=CURRFTE.EMPLOYEE)
    /--Added by KAM--/                                
                     AND (CHANGELIST.COMPANY=CURRFTE.COMPANY)
                     INNER JOIN LAWSON.PGSELECT PGSELECT
                       ON ((EMPLOYEE.COMPANY=PGSELECT.COMPANY)
                     AND (EMPLOYEE.EMP_STATUS=PGSELECT.BEGIN_VALUE))
                     LEFT OUTER JOIN LAWSON.PAPOSITION
                     ON (EMPLOYEE.POSITION=PAPOSITION.POSITION)
                     AND (EMPLOYEE.COMPANY=PAPOSITION.COMPANY)
                     INNER JOIN LAWSON.PAEMPLOYEE
                     ON (CHANGELIST.EMPLOYEE=PAEMPLOYEE.EMPLOYEE)
    /--Added by KAM--/               
                    AND (CHANGELIST.COMPANY=PAEMPLOYEE.COMPANY)
    WHERE
    (PGSELECT.GROUP_NAME='G:ACTIVE' OR PGSELECT.GROUP_NAME='G:INACTIVE')
    >

    Hi Arsh,
    The error message you receive i.e.
    ORA-01830: date format picture ends before converting entire input string
    is an Oracle error.
    The following document would be helpful:
    ORA-01830:     date format picture ends before converting entire input string
    Cause:     A valid date format picture included extra data. The first part of the format picture was converted into a valid date, but the remaining data was not required.
    Action:     Check the specifications for date format pictures and correct the statement.
    Regards,
    Alpana

  • Problem with Date formatting

    Hi Tim,
    I am facing some issues with formatting the date using XMLP. The following is the sample XML data file i am using:
    <LIST_G_HEADER>
    <G_HEADER>
    <QUOTE_HEADER_ID>1455</QUOTE_HEADER_ID>
    <QUOTE_NUMBER>2027</QUOTE_NUMBER>
    <QUOTE_VERSION>1</QUOTE_VERSION>
    <QUOTE_NAME>Test GM Report - Rabindra</QUOTE_NAME>
    <SOURCE_NAME>Fletcher, MR. Paul</SOURCE_NAME>
    <QUOTE_DATE>27-OCT-2005</QUOTE_DATE>
    <CURRENCY_CODE>GBP</CURRENCY_CODE>
    </G_HEADER>
    </LIST_G_HEADER>
    The formatting i use for my date field i.e <QUOTE_DATE>, ends up either with NO formatting or giving me an error "[010906_114656657][][ERROR] Invalid XSD string: 27-OCT-2005 (XMLP Template Viewer)". The default formatting available with the form field dialog box (MS-Word) feature also doesn't work.
    I have the following formatting for this field in the form field:
    <?format-date:QUOTE_DATE; 'MEDIUM' ?>
    When i read the user guide, it reads that the date should be in the canonical format i.e: YYY-MM-DDThh:mm:ss+HH:MM
    However i am not getting the date from the base table's in this format. Is the error happening due to incorrect format or is there some other reason behind this? Please let me know, how can i overcome this issue.
    Thx,
    Nitin

    As i mentioned in another thread
    substring function and date format
    Please use this standards
    <?xdofx:expression?>
    for extended SQL functions or
    <?xdoxslt:expression?>
    for extended XSL functions.
    Use like
    <?xdofx:rpad(LAST_NAME),30, ’x’)?>
    <?xdofx:Instr(’abcabcabc’,’a’,2))?>
    <?xdofx:upper(char)?>
    <?xdofx:lower (char)?>
    <?xdofx:greatest ( expr [, expr]... )?>
    ETC.....

  • Error in date format when  I load a CSV file

    I am using Oracle G10 XE and I am trying to load data into my database from comma separated files.
    When I load the data from a CSV file which has the date with the following format "DD/MM/YYYY", I received the following error "ORA-01843: not a valid month".
    I have the NSL_LANG set to AMERICAN. I have tried the following command: "ALTER SESSION SET NLS DATE FORMAT="DD/MM/YYYY" and this does nothing. When I try to run "SELECT SYSDATE "NOW" FROM DUAL;" I get the date in this format "10-NOV-06".
    I will appreciate any help about migrating my data with date fields in format DD//MM/YYYY.
    Sincerely,
    Polonio

    See Re: Get error in date when I load a CSV file

  • Error with Date Variable

    I am trying to create a process to import to import data using a date variable but when I use the date to get the data from SQL server I am getting a error.
    I have tried setting the variable as both a string and date - Select
    CONVERT(varchar(10), DATEADD(day, -1, GETDATE()), 101) and map it to the Variable. The date variable is working. It’s correct in the Watch and I am able to use the variable to get data from an Open Link database (row_date = ?)
    in the OLE DB Source query. I get a "Invalid character value for cast specification"
    error when doing the same thing to get data from an SQL Server OLE DB Source
    where the date field is DateTime (row_date = ?). I have tried making the variable as a date and string but get the same error regardless. To make it work, I have to duplicate the date
    calculation in the query - HAVING (row_date = CONVERT(varchar(10), DATEADD(day, -1, GETDATE()), 101) ) which works fine.
    HAVING (row_date = ?) gives the error with the Parameter mapped to the variable.
    Any suggestions as to how to make this work correctly?

    May I suggest to use style 111 instead of 101?
    From experience, yyyy/mm/dd date format will work most of the time for date conversion and
    It's due to different date format from mm/dd/yyyy to the system date format that SQL Server is using.
    Hope this helps.
    ~ J.

  • Report data binding error with date values

    I have CF7.02 with a Microsoft Visual FoxPro 9.0 SP1 Database
    that I connect to using ODBC (FoxPro Driver 6.01.8630.01). I send
    my sql results to a CF Report Builder 7.02 PDF report and it works
    fine. If I dump the date values before I change them, they look
    like the following: {ts '2004-12-20 00:00:00'} . However I have
    tried a number of ways of manipulating the date before sending it
    to the report, but I continue to get errors. I don't care what
    format they go to the report in, since the report reformats them
    anyway. I checked to make sure that none of the dates were null.
    For example <cfset ReportQuery.PrcInputDate[lcCurRow] =
    CreateODBCDateTime(#ldCFPrcInputDate#) /> yields values in the
    {ts '2004-12-20 00:00:00'} format when I dump the query results to
    screen. Where:
    ldCFPrcInputDate = 12/20/2004
    CreateODBCDateTime(ldCFPrcInputDate) = {ts '2004-12-20
    00:00:00'}
    ReportQuery.PrcInputDate[lcCurRow] = {ts '2004-12-20
    00:00:00'}
    I get the error:
    Report data binding error Unable to get value for field
    'prcinputdate' of class 'java.util.Date'.
    coldfusion.runtime.OleDateTime -> Date
    Not using the CreateODBCDate function for example <cfset
    ReportQuery.PrcInputDate[lcCurRow] = #ldCFPrcInputDate# /> I
    get:
    Report data binding error Unable to get value for field
    'prcinputdate' of class 'java.util.Date'.
    java.lang.String -> Date
    Here are some of my failed attempts:
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    CreateODBCDateTime(#ldCFPrcInputDate#) />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    #ldCFPrcInputDate# />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    DateFormat(CreateODBCDate(#ldCFPrcInputDate#),'mm/dd/yyyy') />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    CreateODBCDate(DateFormat(#ldCFPrcInputDate#,'mm/dd/yyyy') />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    CreateODBCDate(DateFormat(#ldCFPrcInputDate#,'mm-dd-yyyy') />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    Trim(createODBCDateTime(ldtmpdate)) />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    CreateODBCDate({05-07-2006}) />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    CreateODBCDate('{05-07-2006}') />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    CreateODBCDate(05/07/2006) />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    CreateODBCDate('05/07/2006')/>
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    CreateODBCDate(parseDateTime('05/07/2006')) />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    parseDateTime(CreateODBCDateTime(05/07/2006)) />
    <cfset ReportQuery.PrcInputDate[lcCurRow] =
    parseDateTime(CreateODBCDateTime('#ldCFPrcInputDate#')) />
    <cfset ReportQuery.PrcInputDate[lcCurRow] = '{05-07-2006}'
    />
    <cfset ReportQuery.PrcInputDate[lcCurRow] = '{05/07/2006}'
    />
    <cfset ReportQuery.PrcInputDate[lcCurRow] = '05/07/2006'
    />
    I also did some googling without success. Any help is
    appreciated.

    You may want to make sure that the column is not included in
    the query variable list in your report cfr file.
    The newest version of the Report Builder, which may be
    installed on the server, no longer tolerates vars appearing in that
    list of they are not in the query itselft.

Maybe you are looking for

  • Apple TV 4.4.4 Home Sharing no longer working over ethernet

    My ATV home network setup has gone from working well to not at all over the last few days and I am trying to troubleshoot it, looking for folks with similar experiences.  This appeared to start on or around the time I did the 4.4.4 update, though it

  • Dynamic List for IN Operator

    I'm just wondering if there is anyway this is possible. I have a function which generates a list of ids which I am using in my where clause. It looks something like the following: SELECT blah from blahblah WHERE blahblahblah IN function_blah(####) fu

  • 3G is blazing for me!

    Just took the phone off of Wifi and tried to surf some webs on 3G after driving away from the house... Super fast! God I love this phone!

  • Fault Tolerance of NFS and iSCSI

    Hello, I'm currently designing a new datacenter core environment. In this case there are also nexus 5548 with FEXs involved. On this fex's there are some servers which speak NFS and iSCSI. While changing the core component there will be a disruption

  • Exporting for email (Windows)

    Whats the best way to export a movie for email so that Windows users can see it?