Date must be between year 1 and year 9999 - error message

I am receiving the following error message "Dates must be between year 1 and year 9999".  The highest value in the next date value in the DB is 12/31/9999.  The parameters being entered are 01/1900 and 12/9999.  The following formula is the cause of the error:
EvaluateAfter ({@Start Date});
Global DateVar EndDate;
       Global StringVar  strEndMonth:=Mid({?End Month/Year} ,1, 2) ;
       Global StringVar  strEndYear:=Mid({?End Month/Year} ,4, 4) ;
       Global NumberVar  nNextMonth:=CDbl (strEndMonth) + 1 ;
       Global StringVar  strEndDay:=ToText(Day(DateSerial (CDbl (strEndYear) , nNextMonth, 1-1) ) , 0) ;
       Global StringVar  strEndDate:=Right ("00" + strEndMonth, 2 ) + "/"Right ("00"strEndDay,2) +"/"  +strEndYear ;
       Global DateVar EndDate:=CDate(strEndDate) ;
The bolded section is the section of the formula highlighted in Crystal.  I've determined if the user enters 11/9999 as the end date instead of 12/9999 the report runs fine.  Is this a problem with the formula or a limitation in Crystal or little of both?  I don't understand what the formula is doing but at the end of the year it looks like it counts forward to January and then back to December and obviously 9999 is the highest year possible so the attempt to go a month ahead tanks.  Is there a change I can make in the formula to avoid this error?

The error lies in the formula.
Global NumberVar nNextMonth:=CDbl (strEndMonth) + 1 ;
When you enter 12/9999 it adds 1 to the month of 12 giving it 13.
Global StringVar strEndDay:=ToText(Day(DateSerial (CDbl (strEndYear) , nNextMonth, 1-1)) , 0) ;
This calculates the last day of the month.  Since from above the variable nNextMonth is 13, it tries to calculate 9999, 13, 1-1 which is invalid since there is no 13th month in any year.
Make this change and it should work fine.
Global DateVar EndDate;
Global StringVar strEndMonth:=Mid({?End Month/Year} ,1, 2) ;
Global StringVar strEndYear:=Mid({?End Month/Year} ,4, 4) ;
Global NumberVar nNextMonth:=if CDbl (strEndMonth) = 12 then CDbl (strEndMonth) else CDbl (strEndMonth)+ 1 ;
Global StringVar strEndDay:=ToText(Day(DateSerial (CDbl (strEndYear) , nNextMonth,
if CDbl (strEndMonth) = 12 then 31 else 1-1)) , 0) ;
Global StringVar strEndDate:=Right ("00" + strEndMonth, 2 ) + "/"+Right ("00"+strEndDay,2) +"/" +strEndYear ;
Global DateVar EndDate:=CDate(strEndDate) ;
Edited by: Sanjay Kodidine on Apr 7, 2009 11:19 AM

Similar Messages

  • Object name must have between 000003 and 000009 characters

    Hi BW Experts,
    When I am trying to create a cube I am getting the below error message:
    Object name Z0FIGL_01 must have between 000003 and 000009 characters. Message no. R7112
    It would be great if some one can help me to resolve the issue...
    Regards,
    Reddy

    Hi
    The infocube technical name must be in between 3 to 9 characteristics length
    i.e,Min 3 Char & Max 9 Char
    is ZOFIGL_01 is ur object name ?its defined within limits,need to verify:)
    hope this helps
    Sriman
    Edited by: Sreeman on Apr 11, 2008 9:34 PM

  • Regarding the error ORA-01841: (full) year must be between -4713 and +9999,

    The issue is the code is not inserting the good records into the MIE table. This is becasue of the error 'OtherError GFSTM_INS_SNURK_NEW_TABLES_PA.gfstm_ins_asn_journal_pr:ORA-01841: (full) year must be between -4713 and +9999, and not be 0' This error is throwing out because of space issue in dt_asn_shipped.
    My requirement is to log error if any if not get the next record in the loop and insert it in the table if it has no error. The issue is good records are not getting inserted. The snurk_cmms_crct018_asn_journl in the cursor is a synonym which uses dblionk to connect to the remote db. The dt_asn_shipped data type is char(6) and the format is YYMMDD.
    declare
    CURSOR cur_asn_journal IS
    SELECT NVL(TRIM(cd_asn_plant),' ') cd_asn_plant,
         NVL(TRIM(no_journal),0) no_journal,
    NVL(TRIM(cd_ship_from),' ') cd_ship_from,
         TRIM(no_asn) no_asn,
    DECODE(LENGTH(dt_asn_shipped),6, to_date(to_char(to_date(trim(dt_asn_shipped),'YYMMDD'),
    'DD-MON-YY'),'DD-MON-YY'), '') dt_asn_shipped,
    TRIM(dt_processed) dt_processed,
    TRIM(in_manual) in_manual,
         TRIM(ts_last_update) ts_last_update     
    FROM snurk_cmms_crct018_asn_journl;
    BEGIN
    FOR l_rec_asn_journal IN cur_asn_journal LOOP
    BEGIN
    INSERT INTO gfstmie_st_cmms_asn_journal
    gsdb_site_code ,
    journal_num,
    gsdb_site_from_code,
    adv_shipping_notice_cnum,
    adv_sn_shipping_date,
    processed_date,
    manual_in_code,
    cmms_last_update_cdate,
    create_userid,
    create_dts,
    update_userid,
    update_dts
    ) VALUES
    l_rec_asn_journal.cd_asn_plant,
    l_rec_asn_journal.no_journal,
    l_rec_asn_journal.cd_ship_from,
    l_rec_asn_journal.no_asn,
    l_rec_asn_journal.dt_asn_shipped,
    l_rec_asn_journal.dt_processed,
    l_rec_asn_journal.in_manual,
    l_rec_asn_journal.ts_last_update,
    g_con_user_id,
         l_dts_current_gmt,
    g_con_user_id,
    l_dts_current_gmt
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('l_num_exception_pt_7');
    --To assign value to error attributes
    l_str_email_body := GFSTU_MSG_CONTEXT_STACKER_PA.gfstu_add_msg_context_fn(
    SQLERRM || l_str_process_track,
    g_con_package_name || l_con_proc_name,
    g_con_string_null);
    l_rec_apm_error_attributes.job_run_sakey := l_num_job_run_id;
    l_rec_apm_error_attributes.proj_acronym_code := GFSTM_PARM_SPECIFICATION_PA.g_con_proj_acronym_code_ta;           
    l_rec_apm_error_attributes.module_code := l_con_module_code;
    l_rec_apm_error_attributes.notes_text := l_str_email_body;
    l_rec_apm_error_attributes.msg_id := GFSTM_PARM_SPECIFICATION_PA.g_con_msg_id_invalid_date;
    --Calling procedure to log and notify subscribers of transaction
    --related errors and informational messages
    GFSTM_COMMON_UTL_PA.gfstm_log_message_pr(
    SUBSTR(l_str_email_body,1,2000),
    g_con_string_null,
    g_con_string_null,
    SUBSTR(l_str_email_body,1,2000),
    l_rec_apm_error_attributes,
    g_con_string_null,
    l_num_wait_time,
    l_num_wait_interval_time,
    l_str_msg_action_code,
    l_num_oracle_error_code,
    l_str_oracle_msg,
    l_num_return_code,
    l_num_status);
    END;
    END LOOP;
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('l_num_exception_pt_12');
    DBMS_OUTPUT.PUT_LINE('l_num_exception_pt_2 '||l_str_procg_mode_code);
    --Rollback uncommitted transactions
    ROLLBACK;
    --Assigning failure status
    o_num_status := g_con_status_failure;
    --Assigning procedure end time in GMT
    l_dts_end_time := GFSTU_DATETIME_UTILITIES_PA.gfstu_to_gmt_fn;
    --To assign value to error attributes
    l_str_email_body := GFSTU_MSG_CONTEXT_STACKER_PA.gfstu_add_msg_context_fn(
    SQLERRM || l_str_process_track,
    g_con_package_name || l_con_proc_name,
    g_con_string_null);
    l_rec_apm_error_attributes.job_run_sakey := l_num_job_run_id;
    l_rec_apm_error_attributes.proj_acronym_code := GFSTM_PARM_SPECIFICATION_PA.g_con_proj_acronym_code_ta;           
    l_rec_apm_error_attributes.module_code := l_con_module_code;
    l_rec_apm_error_attributes.notes_text := l_str_email_body;
    l_rec_apm_error_attributes.msg_id := GFSTM_PARM_SPECIFICATION_PA.g_con_msg_id_oracle;
    --Calling procedure to log and notify subscribers of transaction
    --related errors and informational messages
    GFSTM_COMMON_UTL_PA.gfstm_log_message_pr(
    SUBSTR(l_str_email_body,1,2000),
    g_con_string_null,
    g_con_string_null,
    SUBSTR(l_str_email_body,1,2000),
    l_rec_apm_error_attributes,
    g_con_string_null,
    l_num_wait_time,
    l_num_wait_interval_time,
    l_str_msg_action_code,
    l_num_oracle_error_code,
    l_str_oracle_msg,
    l_num_return_code,
    l_num_status);
    --Calling procedure to update the job status
    GFSTM_COMMON_UTL_PA.gfstm_update_job_status_pr(
    l_num_job_run_id,
    GFSTM_PARM_SPECIFICATION_PA.g_con_process_abort,
    l_dts_end_time,
    g_con_perf_metric_code,
    g_con_zero,
    g_con_n,
    l_num_oracle_error_code,
    l_str_oracle_msg,
    l_num_return_code,
    l_num_status);
    END ;
    Thanks,
    Vinodh

    Hi,
    Could you not have reduced your question to what is relevant?
    You seem to be saying that this is your problem:
    SELECT DECODE ( LENGTH (dt_asn_shipped),
              6,
              TO_DATE ( TO_CHAR ( TO_DATE ( TRIM (dt_asn_shipped), 'YYMMDD'), 'DD-MON-YY'), 'DD-MON-YY'),
             dt_asn_shipped
    FROM   snurk_cmms_crct018_asn_journl;As far as I can see, problem might be that you decode on UNTRIMMED length.
    Also, you could get rid of some the to_date(to_char(to_date), which is nothing more than simply to_date()
    Try something like
    SELECT CASE LENGTH (TRIM (dt_asn_shipped))
             WHEN 6 THEN TO_DATE ( TRIM (dt_asn_shipped), 'YYMMDD')
           END
             dt_asn_shipped
    FROM   snurk_cmms_crct018_asn_journl;Regards
    Peter

  • Error ORA-01841: (full) year must be between -4713 and +9999, and not be 0

    Hi Experts,
    I seem to be getting the error "Error ORA-01841: (full) year must be between -4713 and +9999, and not be 0" when my dates are in the year 2000. Here's my SQL:
    DROP TABLE PER_ALL_ASSIGNMENTS_M_XTERN;
    create table PER_ALL_ASSIGNMENTS_M_XTERN(
    PERSON_NUMBER                    VARCHAR2(30 CHAR),
    ASSIGNMENT_NUMBER VARCHAR2(30 CHAR),
    EFFECTIVE_START_DATE                DATE,
    EFFECTIVE_END_DATE           DATE,
    EFFECTIVE_SEQUENCE           NUMBER(4),
    ASS_ATTRIBUTE_CATEGORY           VARCHAR2(30 CHAR),
    ASS_ATTRIBUTE1 VARCHAR2(150 CHAR),
    ASS_ATTRIBUTE_NUMBER20 NUMBER,
    ASS_ATTRIBUTE_DATE1 DATE,
    ASS_ATTRIBUTE_DATE2 DATE,
    ASS_ATTRIBUTE_DATE3 DATE,
    ASS_ATTRIBUTE_DATE4 DATE,
    ASS_ATTRIBUTE_DATE5 DATE,
    ASS_ATTRIBUTE_DATE6 DATE,
    ASS_ATTRIBUTE_DATE7 DATE,
    ASS_ATTRIBUTE_DATE8 DATE,
    ASS_ATTRIBUTE_DATE9 DATE,
    ASS_ATTRIBUTE_DATE10 DATE,
    ASS_ATTRIBUTE_DATE11 DATE,
    ASS_ATTRIBUTE_DATE12 DATE,
    ASS_ATTRIBUTE_DATE13 DATE,
    ASS_ATTRIBUTE_DATE14 DATE,
    ASS_ATTRIBUTE_DATE15 DATE,
    ASG_INFORMATION_CATEGORY           VARCHAR2(30 CHAR),
    ASG_INFORMATION1 VARCHAR2(150 CHAR),
    ASG_INFORMATION_NUMBER20 NUMBER,
    ASG_INFORMATION_DATE1 DATE,
    ASG_INFORMATION_DATE2 DATE,
    ASG_INFORMATION_DATE3 DATE,
    ASG_INFORMATION_DATE4 DATE,
    ASG_INFORMATION_DATE5 DATE,
    ASG_INFORMATION_DATE6 DATE,
    ASG_INFORMATION_DATE7 DATE,
    ASG_INFORMATION_DATE8 DATE,
    ASG_INFORMATION_DATE9 DATE,
    ASG_INFORMATION_DATE10 DATE,
    ASG_INFORMATION_DATE11 DATE,
    ASG_INFORMATION_DATE12 DATE,
    ASG_INFORMATION_DATE13 DATE,
    ASG_INFORMATION_DATE14 DATE,
    ASG_INFORMATION_DATE15 DATE
    organization external
    ( default directory APPLCP_FILE_DIR
    access parameters
    ( records delimited by newline skip 1
         badfile APPLCP_FILE_DIR:'PER_ALL_ASSIGNMENTS_M_XTERN.bad'
    logfile APPLCP_FILE_DIR:'PER_ALL_ASSIGNMENTS_M_XTERN.log'
    fields terminated by ',' OPTIONALLY ENCLOSED BY '"'
    (PERSON_NUMBER,     
    ASSIGNMENT_NUMBER,
    EFFECTIVE_START_DATE CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    EFFECTIVE_END_DATE CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    EFFECTIVE_SEQUENCE,
    ASS_ATTRIBUTE_CATEGORY,
    ASS_ATTRIBUTE1,
    ASS_ATTRIBUTE_NUMBER20,
    ASS_ATTRIBUTE_DATE1 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE2 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE3 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE4 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE5 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE6 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE7 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE8 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE9 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE10 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE11 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE12 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE13 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE14 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE15 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_CATEGORY,
    ASG_INFORMATION1,
    ASG_INFORMATION_NUMBER20,
    ASG_INFORMATION_DATE1 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE2 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE3 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE4 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE5 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE6 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE7 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE8 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE9 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE10 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE11 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE12 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE13 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE14 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE15 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY"
    location ('PER_ALL_ASSIGNMENTS_M.csv')
    REJECT LIMIT UNLIMITED;
    ...and getting errors when data looks like the following:
    E040101,EE040101,*1-Aug-2000*,31-Dec-4712,1,,NDVC,YES,DE,SFC,N,STIP Plan - Pressure,,,,,,,E040101,,,,2080,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,5,,,,,,,,,,,,31113,31113,31113,31113,31113,31113,,,1-Jan-2012,31-Dec-2012,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    ...error message:
    error processing column EFFECTIVE_START_DATE in row 19 for datafile /u05/dbadir/jmf/incident_logs/PER_ALL_ASSIGNMENTS_M.csv
    ORA-01841: (full) year must be between -4713 and +9999, and not be 0
    Thanks,
    Thai

    Here is a snippet of the bad file data:
    E040110,EE040110,01-Aug-00,31-Dec-12,1,,NDVC,YES,DE,SFC,N,STIP Plan - Pressure,,,,,,,E040110,,,,2080,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,5,,,,,,,,,,,,27667.2,27667.2,27667.2,27667.2,27667.2,27667.2,,,01-Jan-12,31-Dec-12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    E040100,EE040100,01-May-00,31-Dec-12,1,,NDVC,YES,DE,SFC,N,STIP Plan - Pressure,,,,,,,E040100,,,,2080,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,5,,,,,,,,,,,,31113,31113,31113,31113,31113,31113,,,01-Jan-12,31-Dec-12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    E040101,EE040101,01-Aug-00,31-Dec-12,1,,NDVC,YES,DE,SFC,N,STIP Plan - Pressure,,,,,,,E040101,,,,2080,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,5,,,,,,,,,,,,31113,31113,31113,31113,31113,31113,,,01-Jan-12,31-Dec-12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    E000916,EE000916,01-Oct-00,31-Dec-12,1,,NDVC,YES,NL,SFC-Commercial,E,SIP Plan - Control Technologies,,,,,,,E000916,21000000,555000,99000,2080,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,10,,,,,,,,,,,,34905.65,34905.65,34905.65,34905.65,34905.65,34905.65,,,01-Jan-12,31-Dec-12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    E000807,EE000807,03-Jan-00,31-Dec-12,1,,NDVC,YES,FR,SFC-Commercial,E,STIP Plan - Cross BU,,,,,,,E000807,,,,2080,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,3,,,,,,,,,,,,35448.56,35448.56,35448.56,35448.56,35448.56,35448.56,,,01-Jan-12,31-Dec-12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    E000851,EE000851,25-Apr-00,31-Dec-12,1,,NDVC,YES,FR,SFC-Commercial,E,SIP Plan - Control Technologies,,,,,,,E000851,21000000,555000,99000,2080,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,13,,,,,,,,,,,,43283.76,43283.76,43283.76,43283.76,43283.76,43283.76,,,01-Jan-12,31-Dec-12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    So, the successfully loaded data is being loaded where year=2003 in the CSV as year=0003. Even though the data is loaded fine the data is not correct. For some reason the external table is set to have the year truncated.

  • Monday's Date  of the given week  and year

    Hi gurus,
    I have the data for week ( eg.52 ) and year ( eg. 08 ) and I need to get the date of the Monday of that week (21-DEC-2008...i.e 52th week of 2008 Year.)
    Pls let me knw the sql statement solution for this ..
    THanks,
    shashi..

    Hi, Shashi,
    There's a bug in what I posted before.
    Do this instead:
    TRUNC ( TO_DATE ( '01-Jul-' || :year_txt
                    , 'DD-Mon-YYYY'
          , 'IY'
          ) + (7 * (:week_val - 1))The only change is in TO_DATE.
    Here's the problem.
    TO_DATE won't work with ISO years; it only takes calendar years.
    When you don't specify a day and month in TO_DATE (like I originally did) it defaults to the first day of the current month. So TO_DATE ('2011', 'YYYY') returns October 1, 2011 when the current month is October, and it returns January 1, 2011 when the current month is January.
    January 1, 2011, however, is in ISO year 2010. (ISO 2011 begins on the Monday closest to January 1, which is January 3, 2011). My original solution, therefore, would return dates from ISO year 2010 when anyone asked for year 2011 and they happend to be running the program during January.
    Specifying a full date makes the expression behave the same regardless of when it is run.

  • Pick list date must be between order date and cancellation date

    Hi all
    A client gets this error:
    Pick list date must be between order date and cancellation date Message[173-89]
    The date is between that range.
    What else could be the reason for it.
    Thanks

    Hi
    Since the message you received is very user friendly - date must be between....
    I guess you have two situation
    1.Either operation is incorrect
    - Create a similar scenario in  your test environment
    -Are you receiving same error
    -Test with only one item so far
    -Check what is the result
    2 . You probably need to upgrade your patch level
       It might be coming from Application error
    Hope this helpls
    Bishal

  • Getting all dates of a particular month and year

    I want to get list of all dates of a particular month and year .
    How to get using Calendar List?

    Create a Calendar object. Set it's month and year. Then call getActualMaximum(Calendar.DAY_OF_MONTH); on the Calendar object. That will tell you how many days are in the month of that year.

  • Frm-50004: day must be between 1 and last of month.

    frm-50004: day must be between 1 and last of month.
    hi dear all,
    I HAVE A TEXTITEM OF DATATYPE DATE. ITS FORMAT MASK IS 'HH24-MI-SS AM' BUT
    WHEN I TRY TO INSERT IT GIVES THE FOLLOWING ERROR:
    FRM-50004: Day must be between 1 and last of month.
    thanks
    Muhammad Nadeem
    Mardan (Pakistan)
    [email protected]

    I don't think you are getting that error message from that date item. Oracle defaults the month to current month, day to 01, and year to current year when they aren't entered in a date.
    However, you cannot use 'HH24' with the 'AM' meridian indicator, so that format mask is illegal, and SHOULD generate a different error message.
    And last, if you want Forms to carry the time in a date field, you MUST set the datatype to datetime.

  • Years and years ago I signed up for firefox sync. I have no idea what the password is so I can use it on the new computer. I also do not know what email address I was using at the time.

    Years and years ago I first started with firefox sync. I have no idea what the password is. Nor do I remember the email address I was using at the time. I now have a new computer and can't set up the firefox sync. I can not be the only person to have had this problem.

    Unless you remember your "Username" (Not Email) then the only option I'm aware of is to Create a new account
    *Request [https://account.services.mozilla.com/forgot Forgotten Password] (Username Needed)
    *Create [http://www.mozilla.org/en-US/mobile/sync/ New Account]
    The whole point of Firefox Sync is to save/access data between different devices - Your Username should be listed on one of your Devices, unless you just happen to replace all of them at the same time.
    If you could gain access to an account w/ atleast knowing the Username/Email Address/Password then what would be the point of "Security"
    Thats why [http://www.steganos.com/us/products/for-free/locknote/overview/ LockNote] is handy to jot down account notes and secure it w/ a password... stick it on a thumbdrive.

  • Day must be between 1 and last day of month

    Hi
    I have a master detail form for overtime entries.
    Master Block contain emp_no,name,month etc.
    Detail block contain a date field ,,from time, to time etc
    when i enter the date in detail block it defaults the month from Server date and i am getting the error "Day must be between 1 and last day of ...."
    The form is going to reside on server so i cant go for changing system date for that.
    THe work around i am trying is i have created a dummy item in detail block for Date(dd) entry and populating my original date field on the basis of it.
    so that i can get rid of last day validation of month.The datatype of dummy item is char
    my code is
    c_day varchar(2);
    c_month varchar(2);
    c_year varchar(4);
    d_date varchar(8);
    begin
    c_day := :DETAIL.dummy;
    c_month := to_char(:MASTER.month, 'mm');
    c_year := to_char(:master.month, 'yyyy');
    d_date := c_day||c_month||c_year;
    :DETAIL.ot_date := to_date(d_date,'ddmmyyyy');
    end;
    I am using post change trigger on my dummy item but i am getting ORA-01840 for that.I have tried several ways but it is giving different type of date errors for that.
    Any help is highly appreciated

    Dear try this
    SELECT RUN_NUM, CV AS MONTH_DATE
    FROM
    SELECT ROWNUM AS RUN_NUM,TO_DATE('01-' || 'SEP' || '-' || 2007 ,'DD/MM/YYYY')+ (ROWNUM-1) CV
    FROM
    (SELECT 1 FROM DUAL GROUP BY CUBE (1,1,1,1,1)) A
    WHERE TO_CHAR(CV,'MON-YYYY') = 'SEP-2007'

  • ORA-1850: hor must be between 0 and 23 error

    Hi All
    i have the following table for creating and inserting i included only two fileds as these are the fields that i'm getting errors on.
    WITH     sample_data     AS
         SELECT     '50709' AS start_date, '2400' AS start_time  FROM dual     UNION ALL
         SELECT     '082510',              '0000'                  FROM dual
    SELECT       *
    FROM       sample_data
    ;DATA:
    START_DATE     START_TIME
    50709                        2400
    082510                        0000And now when i run the query against the table:
    SELECT   direction, car_count_pos, truck_count_pos,
             (car_count_pos + 2 * (truck_count_pos)) AS adjusted, car_count_neg,
             truck_count_neg,
             (car_count_neg + 2 * (truck_count_neg)) AS adjusted_neg,
             TO_DATE (start_date, 'MMDDYY') AS start_date,
             TO_DATE (end_date, 'MMDDYY') AS end_date,
             ROUND (TO_CHAR (TO_DATE (LPAD (start_time, 4, '0'), 'HH24MI'),
                             'HH24.MI'
                   ) AS start_time,
             start_time,
             (TO_DATE (end_date, 'MMDDYY') - TO_DATE (start_date, 'MMDDYY')
             ) AS days
        FROM (SELECT   (CASE
                           WHEN t1.direction = '1'
                              THEN (  COUNT (t1.bin_1_data)
                                    + COUNT (t1.bin_2_data)
                                    + COUNT (t1.bin_3_data) * 0.981 * 1.019
                           ELSE NULL
                        END
                       ) AS car_count_pos,
                       t1.direction,
                       (CASE
                           WHEN t1.direction = '1'
                              THEN (  COUNT (t1.bin_4_data)
                                    + COUNT (t1.bin_5_data)
                                    + COUNT (t1.bin_6_data)
                                    + COUNT (t1.bin_7_data)
                                    + COUNT (t1.bin_8_data)
                                    + COUNT (t1.bin_9_data)
                                    + COUNT (t1.bin_10_data)
                                    + COUNT (t1.bin_11_data)
                                    + COUNT (t1.bin_12_data)
                                    + COUNT (t1.bin_13_data)
                                    + COUNT (t1.bin_14_data)
                                    + COUNT (t1.bin_15_data) * 0.981 * 1.019
                           ELSE NULL
                        END
                       ) AS truck_count_pos,
                       (CASE
                           WHEN t1.direction = '3'
                              THEN (  COUNT (t1.bin_1_data)
                                    + COUNT (t1.bin_2_data)
                                    + COUNT (t1.bin_3_data) * 0.981 * 1.019
                           ELSE NULL
                        END
                       ) AS car_count_neg,
                       (CASE
                           WHEN t1.direction = '3'
                              THEN (  COUNT (t1.bin_4_data)
                                    + COUNT (t1.bin_5_data)
                                    + COUNT (t1.bin_6_data)
                                    + COUNT (t1.bin_7_data)
                                    + COUNT (t1.bin_8_data)
                                    + COUNT (t1.bin_9_data)
                                    + COUNT (t1.bin_10_data)
                                    + COUNT (t1.bin_11_data)
                                    + COUNT (t1.bin_12_data)
                                    + COUNT (t1.bin_13_data)
                                    + COUNT (t1.bin_14_data)
                                    + COUNT (t1.bin_15_data) * 0.981 * 1.019
                           ELSE NULL
                        END
                       ) AS truck_count_neg,
                       t2.start_date, t2.start_time, t2.end_date, t2.end_time
                  FROM bin_data t1, traffic_sample t2
                 WHERE t1.traffic_sample_id = t2.traffic_sample_id
              GROUP BY t1.direction,
                       t2.start_date,
                       t2.start_time,
                       t2.end_date,
                       t2.end_time)
       WHERE direction IN ('1', '3')
    GROUP BY TO_DATE (start_date, 'MMDDYY'),
             direction,
             car_count_pos,
             truck_count_pos,
             (car_count_pos + 2 * (truck_count_pos)),
             truck_count_neg,
             (car_count_neg + 2 * (truck_count_neg)),
             TO_DATE (end_date, 'MMDDYY'),
             ROUND (TO_CHAR (TO_DATE (LPAD (start_time, 4, '0'), 'HH24MI'),
                             'HH24.MI'
             start_time,
             car_count_negI'm getting the error
    ORA-1850: Hour must be between 0 and 23
    But as you see there is a value 2400 in the table is there any way to get around this? please need help.
    Thanks
    Edited by: thinkingeye on Aug 26, 2010 8:42 AM

    Thanks AP but i came up with something different which i guess sserved the same purpose i used the DECODE fucntion in the INNER query.
    SELECT   direction, car_count_pos, truck_count_pos,
             (car_count_pos + 2 * (truck_count_pos)) AS adjusted, car_count_neg,
             truck_count_neg,
             (car_count_neg + 2 * (truck_count_neg)) AS adjusted_neg,
             TO_DATE (start_date, 'MMDDYY') AS start_date,
             TO_DATE (end_date, 'MMDDYY') AS end_date,
             ROUND (TO_CHAR (TO_DATE (LPAD (start_time, 4, '0'), 'HH24MI'),
                             'HH24.MI'
                   ) AS start_time,
                   ROUND (TO_CHAR (TO_DATE (LPAD (end_time, 4, '0'), 'HH24MI'),
                             'HH24.MI'
                   ) AS end_time,
             start_time,
             (TO_DATE (end_date, 'MMDDYY') - TO_DATE (start_date, 'MMDDYY')
             ) AS days,
             CITY,COUNTY,LOCATION,ROUTE_NBR,ROUTE_TYPE
        FROM (SELECT   (CASE
                           WHEN t1.direction = '1'
                              THEN (  COUNT (t1.bin_1_data)
                                    + COUNT (t1.bin_2_data)
                                    + COUNT (t1.bin_3_data) * 0.981 * 1.019
                           ELSE NULL
                        END
                       ) AS car_count_pos,
                       t1.direction,
                       (CASE
                           WHEN t1.direction = '1'
                              THEN (  COUNT (t1.bin_4_data)
                                    + COUNT (t1.bin_5_data)
                                    + COUNT (t1.bin_6_data)
                                    + COUNT (t1.bin_7_data)
                                    + COUNT (t1.bin_8_data)
                                    + COUNT (t1.bin_9_data)
                                    + COUNT (t1.bin_10_data)
                                    + COUNT (t1.bin_11_data)
                                    + COUNT (t1.bin_12_data)
                                    + COUNT (t1.bin_13_data)
                                    + COUNT (t1.bin_14_data)
                                    + COUNT (t1.bin_15_data) * 0.981 * 1.019
                           ELSE NULL
                        END
                       ) AS truck_count_pos,
                       (CASE
                           WHEN t1.direction = '3'
                              THEN (  COUNT (t1.bin_1_data)
                                    + COUNT (t1.bin_2_data)
                                    + COUNT (t1.bin_3_data) * 0.981 * 1.019
                           ELSE NULL
                        END
                       ) AS car_count_neg,
                       (CASE
                           WHEN t1.direction = '3'
                              THEN (  COUNT (t1.bin_4_data)
                                    + COUNT (t1.bin_5_data)
                                    + COUNT (t1.bin_6_data)
                                    + COUNT (t1.bin_7_data)
                                    + COUNT (t1.bin_8_data)
                                    + COUNT (t1.bin_9_data)
                                    + COUNT (t1.bin_10_data)
                                    + COUNT (t1.bin_11_data)
                                    + COUNT (t1.bin_12_data)
                                    + COUNT (t1.bin_13_data)
                                    + COUNT (t1.bin_14_data)
                                    + COUNT (t1.bin_15_data) * 0.981 * 1.019
                           ELSE NULL
                        END
                       ) AS truck_count_neg,
                       t2.start_date, t2.start_time, t2.end_date,*decode(t2.END_TIME,2400,'2359',t2.end_time) as end_time*,t3.CITY, t3.COUNTY,t3.LOCATION,t3.ROUTE_NBR, t3.ROUTE_TYPE
                  FROM bin_data t1, traffic_sample t2,location_details t3
                 WHERE t1.traffic_sample_id = t2.traffic_sample_id
                 and t2.TRAFFIC_SAMPLE_ID=t3.TRAFFIC_SAMPLE_ID
              GROUP BY t1.direction,
                       t2.start_date,
                       t2.start_time,
                       t2.end_date,
                       t2.end_time,
                       t3.CITY, t3.COUNTY,t3.LOCATION,t3.ROUTE_NBR, t3.ROUTE_TYPE)
       WHERE direction IN ('1', '3')
    GROUP BY TO_DATE (start_date, 'MMDDYY'),
             direction,
             car_count_pos,
             truck_count_pos,
             (car_count_pos + 2 * (truck_count_pos)),
             truck_count_neg,
             (car_count_neg + 2 * (truck_count_neg)),
             TO_DATE (end_date, 'MMDDYY'),
             ROUND (TO_CHAR (TO_DATE (LPAD (start_time, 4, '0'), 'HH24MI'),
                             'HH24.MI'
             start_time,
             car_count_neg,
             end_time,
             CITY,COUNTY,LOCATION,ROUTE_NBR,ROUTE_TYPE

  • Error: ORA-01847: day of month must be between 1 and last day of month

    Hi,
    I am getting this ORA-01847: day of month must be between 1 and last day of month type of error but I have checked my data all are correct.
    I am inserting the data in the merge query. It is giving the above error.
    but when i insert the data like that
    insert into dt(start_date) select TO_DATE (tariff_start_date, 'DD/MM/RRRR') from ext_zpp0a871;
    It does not give any error.
    Please find the below code
    DECLARE
    l_sv_error_msg VARCHAR2 (1000);
    BEGIN
    FOR i IN (SELECT condition_type, sales_org, division_channel, division,
    price_list, ean_upc, amount, unit_of_measure1,
    tariff_start_date, tariff_end_date
    FROM ext_zpp0a871--This is external table
    WHERE condition_type = 'ZPP0' AND ROWNUM < 200)
    LOOP
    BEGIN
    MERGE INTO sap_tariff st
    USING (SELECT i.price_list pl, i.ean_upc upc,
    TO_DATE (i.tariff_start_date, 'DD/MM/RRRR') tsd,
    TO_DATE (i.tariff_end_date, 'DD/MM/RRRR') ted
    FROM DUAL) du
    ON (st.prod_ean_cuni = du.upc
    AND st.pricelist = du.pl
    AND st.tariff_start_date = du.tsd
    AND st.tariff_end_date = du.ted)
    WHEN MATCHED THEN
    UPDATE
    SET st.condition_type = i.condition_type,
    st.sales_org = i.sales_org,
    st.division_channel = i.division_channel,
    st.division = i.division,
    st.amount =
    TO_NUMBER (REPLACE (REPLACE (i.amount, '.', NULL),
    st.uom = i.unit_of_measure1
    WHEN NOT MATCHED THEN
    INSERT (condition_type, sales_org, division_channel, division,
    pricelist, prod_ean_cuni, amount, uom,
    tariff_start_date, tariff_end_date)
    VALUES (i.condition_type, i.sales_org, i.division_channel,
    i.division, i.price_list, i.ean_upc,
    TO_NUMBER (REPLACE (REPLACE (i.amount, '.', NULL),
    i.unit_of_measure1,
    TO_DATE (i.tariff_start_date, 'DD/MM/RRRR'),
    TO_DATE (i.tariff_end_date, 'DD/MM/RRRR'));
    /*INSERT INTO sap_tariff
    (condition_type, sales_org, division_channel,
    division, pricelist, prod_ean_cuni,
    amount,
    uom,
    tariff_start_date,
    tariff_end_date
    VALUES (i.condition_type, i.sales_org, i.division_channel,
    i.division, i.price_list, i.ean_upc,
    TO_NUMBER (REPLACE (REPLACE (i.amount, '.', NULL),
    i.unit_of_measure1,
    TO_DATE (i.tariff_start_date, 'DD/MM/RRRR'),
    TO_DATE (i.tariff_end_date, 'DD/MM/RRRR')
    EXCEPTION
    WHEN DUP_VAL_ON_INDEX
    THEN
    UPDATE sap_tariff
    SET condition_type = i.condition_type,
    sales_org = i.sales_org,
    division_channel = i.division_channel,
    division = i.division,
    amount =
    TO_NUMBER (REPLACE (REPLACE (i.amount, '.', NULL),
    uom = i.unit_of_measure1;
    WHEN OTHERS
    THEN
    l_sv_error_msg := SQLERRM (SQLCODE);
    INSERT INTO sap_tariff_log
    (date_of_load, condition_type, sales_org,
    division_channel, division, price_list,
    prod_ean_cuni, amount, uom,
    tariff_start_date, tariff_end_date,
    rejection_reason
    VALUES (SYSDATE, i.condition_type, i.sales_org,
    i.division_channel, i.division, i.price_list,
    i.ean_upc, i.amount, i.unit_of_measure1,
    i.tariff_start_date, i.tariff_end_date,
    l_sv_error_msg
    END;
    END LOOP;
    COMMIT;
    EXCEPTION
    WHEN OTHERS
    THEN
    l_sv_error_msg := SQLERRM (SQLCODE);
    neo_pro_log ('Others Error', l_sv_error_msg);
    END;

    user13400510 wrote:
    but when i insert the data like that
    insert into dt(start_date) select TO_DATE (tariff_start_date, 'DD/MM/RRRR') from ext_zpp0a871;
    It does not give any error.Maybe the error is on tariff_end_date instead of tariff_start_date ?
    What are the datatypes of tariff_start_date and tariff_end_date ? If they are already dates, and you to_date them (and depending on what your nls_date_xxxxx params are) you can have such errors :SQL> sho parameter nls_date_format
    NAME_COL_PLUS_SHOW_PARAM                 TYPE        VALUE_COL_PLUS_SHOW_PARAM
    nls_date_format                          string      DD/MM/YYYY
    SQL> select to_date(sysdate,'Day dd Mon RRRR') from dual;
    select to_date(sysdate,'Day dd Mon RRRR') from dual
    ERROR at line 1:
    ORA-01846: not a valid day of the week
    SQL> select to_date(sysdate,'hh24:mi:ss dd/mm/rrrr') from dual;
    select to_date(sysdate,'hh24:mi:ss dd/mm/rrrr') from dual
    ERROR at line 1:
    ORA-01850: hour must be between 0 and 23

  • ORA-01847: day of month must be between 1 and last day of month error

    Hi All
    When i run the following code i'm getting the error:ORA-01847: day of month must be between 1 and last day of month error
    SELECT t2.owner_cat,
    t1.owner_id,
    stock_id,
    Sum(received_amount) received_amount,
    Sum(curr_amount) curr_amount,
    Sum(used_amount) used_amount,
    To_char(Add_months(date_work,6),'YYYY') date_work
    FROM (SELECT owner_id_to owner_id,
    stock_id_to stock_id,
    Sum(full_amount) received_amount,
    0 curr_amount,
    0 used_amount,
    To_char(0) date_work
    FROM dw_wms_mat_transfer
    WHERE master_code_id IN ('8664','8665')
    GROUP BY owner_id_to,
    stock_id_to
    UNION ALL
    SELECT owner_id,
    stock_id,
    0 received_amount,
    Sum(curr_amount) curr_amount,
    0 used_amount,
    To_char(0) date_work
    FROM dw_wms_mat_inv
    WHERE master_code_id IN ('8664','8665')
    GROUP BY owner_id,
    stock_id
    UNION ALL
    SELECT t2.owner_id,
    t1.stock_id,
    0 received_amt,
    0 curr_amt,
    Sum(amount) used_amt,
    To_char(Add_months(date_work,6),'YYYY') date_work
    FROM dw_wms_wo_mat_dc t1,
    (SELECT owner_id,
    stock_id
    FROM dw_wms_mat_inv
    WHERE master_code_id IN ('8664','8665')
    GROUP BY owner_id,
    stock_id) t2
    WHERE t1.stock_id = t2.stock_id
    GROUP BY t2.owner_id,
    t1.stock_id,
    To_char(Add_months(date_work,6),'YYYY')) t1,
    dw_wms_setup_owner t2
    WHERE t1.owner_id = t2.owner_id
    GROUP BY t2.owner_cat,
    t1.owner_id,
    stock_id,
    To_char(Add_months(date_work,6),'YYYY')
    But when i just run the inner query:
    (SELECT owner_id_to owner_id,
    stock_id_to stock_id,
    Sum(full_amount) received_amount,
    0 curr_amount,
    0 used_amount,
    To_char(0) date_work
    FROM dw_wms_mat_transfer
    WHERE master_code_id IN ('8664','8665')
    GROUP BY owner_id_to,
    stock_id_to
    UNION ALL
    SELECT owner_id,
    stock_id,
    0 received_amount,
    Sum(curr_amount) curr_amount,
    0 used_amount,
    To_char(0) date_work
    FROM dw_wms_mat_inv
    WHERE master_code_id IN ('8664','8665')
    GROUP BY owner_id,
    stock_id
    UNION ALL
    SELECT t2.owner_id,
    t1.stock_id,
    0 received_amt,
    0 curr_amt,
    Sum(amount) used_amt,
    To_char(Add_months(date_work,6),'YYYY') date_work
    FROM dw_wms_wo_mat_dc t1,
    (SELECT owner_id,
    stock_id
    FROM dw_wms_mat_inv
    WHERE master_code_id IN ('8664','8665')
    GROUP BY owner_id,
    stock_id) t2
    WHERE t1.stock_id = t2.stock_id
    GROUP BY t2.owner_id,
    t1.stock_id,
    To_char(Add_months(date_work,6),'YYYY'))
    I'm not getting that error, any help please?

    Hi,
    Like Anuraq already explained, you need to keep in mind that when you apply a to_char, you've turned your DATE datatype into a STRING and by doing that you've lost the ability to use the add_months function again in your outer query.
    Using a simplified example, extracted from your example:
    MHO%xe> select to_char(add_months(date_work, 6), 'yyyy') date_work
      2  from ( select to_char(0) date_work
      3         from dual
      4         union all
      5         select to_char(0) date_work
      6         from dual
      7         union all
      8         select to_char(add_months(sysdate, 6), 'yyyy') date_work
      9         from dual
    10       );
    select to_char(add_months(date_work, 6), 'yyyy') date_work
    FOUT in regel 1:
    .ORA-01847: day of month must be between 1 and last day of monthHowever, you should either do something like:
    MHO%xe> select nvl(to_char(add_months(date_work, 12), 'yyyy'), '0') date_work
      2  from ( select to_date(null) date_work
      3         from dual
      4         union all
      5         select to_date(null) date_work
      6         from dual
      7         union all
      8         select sysdate date_work
      9         from dual
    10       );
    DATE
    0
    0
    2010or (less clear, more confusing):
    MHO%xe> select nvl(to_char(add_months(date_work, 6), 'yyyy'), '0') date_work
      2  from ( select to_date(null) date_work
      3         from dual
      4         union all
      5         select to_date(null) date_work
      6         from dual
      7         union all
      8         select add_months(sysdate, 6) date_work
      9         from dual
    10       );
    DATE
    0
    0
    2010It's not clear to me why you're using add_months twice (inner + outer query) in your original example.
    As you can see you can get the same results using it only once in your outer query.

  • ORA-01850: hour must be between 0 and 23

    Hi techies,
    We have created a procedure for our daily report.its running fine for two location.when we run for a location we end up with this error.our current NLS_DATE_FORMAT is HH24:MI:SS.but its running successfully when we set nls_date_format='DD-MON-YY'.whereas other two (Which is same except a table from where it fetch data thru dblink) running properly with NLS_DATE_FORMAT is HH24:MI:SS.
    ORA-01850: hour must be between 0 and 23
    ORA-02063: preceding line from DW_TO_DIRC.NACALOGISTICS.COM
    ORA-06512: at "OTSLGWEB.DAILY_JOB_PROFIT_REPORT_USA", line 89
    ORA-06512: at line 1

    Hi Techie,
    Apologies for my vague post.
    Here it would be clear.
    My database NLS_DATE_FORMAT='HH24:MI:SS'
    We have three procedure one is for AUSTRALIA,NEW ZEALAND and USA for daily report.all three are SAME CODE except a view whice is used inside the procedure from where these procedures get data thru dblink and create table in local database.
    when i execute procdure for AUSTRALI AND NEW ZEALAND it was successfull whereas when i execute for USA it was failing with the error i above mentioned.
    if I set
    alter session set nls_date_format='DD-MON-YY';
    and execute the USA Procedure it was successfully completing.
    My question here is..
    1.What was the real cause of this error?
    2.if NLS settings are wrong.how the same code of AUSTRALIA AND NEW ZEALAND is successfull?
    3.Can we add 'alter session set NLS_DATE_FORMAT='DD-MON-YY' inside the procedure? (We do not have approval to change this in DB level so we intend to add it in session level)
    4.is it caused due to data?
    Cheers
    Sameer Ameen

  • Hour must be between 1 and 12

    UPDATE ATTENDENCE SET OUTTIME=TO_TIMESTAMP('" + attendence.getLeaveTime() + "','HH:MI AM') WHERE EMPID='" + attendence.getEmpID() + "' AND ATTENDENCEDATE=to_date('" + attendence.getDate() + "','YYYY-MM-DD')
    attendence.getLeaveTime's return type is Time Stamp. I got error "hour must be between 1 and 12". I passed time stamp like this. setLeaveTime(new Timestamp(inTime.getTime()))
    Edited by: 993001 on Mar 24, 2013 9:47 AM

    CREATE TABLE "ELAMOR"."ATTENDENCE"
    (     "ATTENDENCEID" VARCHAR2(20 BYTE) NOT NULL ENABLE,
         "INTIME" TIMESTAMP (6) NOT NULL ENABLE,
         "OUTTIME" TIMESTAMP (6) NOT NULL ENABLE,
         "EMPID" VARCHAR2(20 BYTE) NOT NULL ENABLE,
         "ATTENDENCEDATE" DATE,
         CONSTRAINT "ATTENDENCE_PK" PRIMARY KEY ("ATTENDENCEID")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
    TABLESPACE "USERS" ENABLE,
         CONSTRAINT "ATTENDENCE_EMPLOYEE_FK1" FOREIGN KEY ("EMPID")
         REFERENCES "ELAMOR"."EMPLOYEE" ("EMPID") ON DELETE CASCADE ENABLE
    ) SEGMENT CREATION IMMEDIATE
    PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
    TABLESPACE "USERS" ;

Maybe you are looking for

  • TS4001 How can I share Safari bookmarks between two iCloud accounts using IOS 7 and Mavericks?

    Before iOS 7 and Mavericks, we were able to share Safari bookmarks between all of our devices.  My wife had the primary iCloud account which was setup to share bookmarks, contacts, calendars and reminders.  A secondary iCloud account was setup on my

  • Photo quality problem in iWeb 08?

    I'm still using iWeb '06 but thinking of upgrading. When the '08 version was new I saw some reports that photos handled by '08 were of lesser quality than that provided by iWeb '06. Is there any truth to this? If so, was it fixed? My main use of iWeb

  • How can I insert a line that extends from a word without it affecting the formatting of the WHOLE document?

    I am trying to create a simple form for people to print out and fill in. I want fields like 'Name' with a line extending from the word for people to write on. What should be the simplest of tasks has confounded me for HOURS. Inserting a line as a 'sh

  • Xperia care do you really care?

    hello sony, I am a loyal customer of this brand but  this loyalty is not paying off. I bought my xperia ZL because of the design. undoutedly it has the best design of all the xperia phones. recently is saw leacked images of xperia Z3 and i got really

  • Satellite C850-1KN - Windows 8.1 Freeze

    Hi, I have tried the search function but cannot find the help I require. My Satellite C850-1KN (windows 8.1) has been freezing a lot recently but I am still able to use the mouse pointer, CTRL + ALT + DEL has no effect and the computer won't do anyth