Please help on Date format

Please go through the following...
look at my parameters here:
1 select rtrim(name)||', '||rtrim(value) from v$parameter
2* where name like 'nls%'
SQL> /
RTRIM(NAME)||','||RTRIM(VALUE)
nls_language, AMERICAN
nls_territory, AMERICA
nls_sort,
nls_date_language,
nls_date_format,
nls_currency,
nls_numeric_characters,
nls_iso_currency,
nls_calendar,
9 rows selected.
The problem is i am trying to query data as on 15-dec-05 but the result showing of 14th and 15th.. please help me
1 select
2 CR_DATE
3 from audit_payhd
4 where cr_date = '15-DEC-05'
5* and nvouch_no = 'JV50655' or ovouch_no = 'JV50655'
SQL> /
CR_DATE
14-DEC-05
14-DEC-05
15-DEC-05
1 select
2 CR_DATE
3 from audit_payhd
4 where TO_char(cr_date,'DD-MON-YY') = TO_CHAR(TO_DATE('15-DEC-05'),'DD-MON-YY')
5* and nvouch_no = 'JV50655' or ovouch_no = 'JV50655'
SQL> /
CR_DATE
14-DEC-05
14-DEC-05
15-DEC-05
1 select
2 CR_DATE
3 from audit_payhd
4 where TO_char(TRUNC(cr_date),'DD-MON-YY') = TO_CHAR(TO_DATE('15-DEC-05'),'DD-MON-YY')
5* and nvouch_no = 'JV50655' or ovouch_no = 'JV50655'
SQL> /
CR_DATE
14-DEC-05
14-DEC-05
15-DEC-05
1 select
2 CR_DATE
3 from audit_payhd
4 where TO_DATE(cr_date) = TO_DATE('15-DEC-05','DD-MON-YY')
5* and nvouch_no = 'JV50655' or ovouch_no = 'JV50655'
SQL> /
CR_DATE
14-DEC-05
14-DEC-05
15-DEC-05

When I need a condition like
AND    (nvouch_no = 'JV50655' OR ovouch_no = 'JV50655')I sometimes like to write it as
AND    'JV50655' IN (nvouch_no, ovouch_no)or even I suppose
AND    'JV50655' = ANY (nvouch_no, ovouch_no)It's the same thing but it saves you repeating the literal, and it avoids the AND/OR bracketing issue.
SQL> SELECT empno, ename FROM emp WHERE 'KING' = ANY(ename, job)
SQL> @xplan
| Id  | Operation            |  Name       | Rows  | Bytes | Cost  |
|   0 | SELECT STATEMENT     |             |     3 |    45 |     2 |
|*  1 |  TABLE ACCESS FULL   | EMP         |     3 |    45 |     2 |
Predicate Information (identified by operation id):
   1 - filter("EMP"."ENAME"='KING' OR "EMP"."JOB"='KING')

Similar Messages

  • Please Help ----------in Date format

    Hi , friends,
    iam in very troubles in this problemb from this week
    i have some text fields , where i put dd/MM/yyyy format as a string , and
    then converting it as date saving in a hash table
    later when i want get back from hash table , iam fromatting ]
    by using
        DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT);
    Date newDate =(Date) (list.get(j));
      String dateString =df.format(newDate);where list is a arraylist
    but how to get dd/MM/yyyy format

    Thanks for your reply
    but
    i have another problemb relating to this
    actuallly i am perparing holiday list
    where i put date and details as a string in two text field and save in a file in appending
    later i convert date String as a date object and putiing in a hash table as a key and value later
    i put keys in a array list (list)and sorting it by Collections.sort(list) method
    and now after sorting i put the sorted date and details in another file,
    and deleting the old file and renaming the file as a old file,
    File f1 = new File("d:/bea/wlserver6.1/date1.txt");
                  FileReader fr = new FileReader(f1);
                    File f2 = new File("d:/bea/wlserver6.1/date3.txt");
                    boolean flag;
                    flag = f2.createNewFile();
    boolean flag1;
                         boolean flag2;
                     flag1 =f1.delete();
                         flag2 = f2.renameTo(f1);
                     System.out.println(flag1);
                     System.out.println(flag2);but still error is coming like fileNotFoundException

  • I have proubleam with string to date conversion, i out put date fromat is 2012-04-30T23:48:55.727-07:00 . so please help me the format conversion

    i have proubleam with string to date conversion, i out put date fromat is 2012-04-30T23:48:55.727-07:00 . so please help me the format conversion.
    i wrote the method but it not workig
    My method is
    -(NSDate *)dateformstr:(NSString *)str
    NSString *date = [str stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
        NSDateFormatter *dateFormate = [[NSDateFormatter alloc] init];
      [dateFormate setDateFormat:@"yyyy-MM-dd'T'HH:mm:sssZZZZ"]
    // NSDate *formatterDate = [dateFormate  dateFromString:str];
        return formatterDate;
    but i did not the value and if i try othere formate i is working but my requiremet format is 2012-04-30T23:48:55.727-07:00.
    can any help it out in this senario.

    Sorry Butterbean, but I'm interested in the answer to your question myself.
    I've spent a few hours transfering my library from one computer to another and then find out that my ratings didn't transfer. Like you, I've spent many hours rating my 2000+ songs. I'm sure you have more, nevertheless, I want to find out how to get those ratings. They still show in my iTunes on my laptop but, when I go to the iTunes folder and display the details of at song, no rating is there. If you find out how to get them to display there in the iTunes folder, it seems that would be the key.
    Hope you get your answer soon.

  • I forgot the code for my iPhone to access the Home screen I do , please help me try formatting the iphone but when I put in nfc mode and connect it to the pc recognizes it and everything when you try to format the error 3004 appears

    I forgot the code for my iPhone to access the Home screen I do , please help me
    try formatting the iphone but when I put in nfc mode and connect it to the pc recognizes it and everything when you try to format the error 3004 appears

    Hello polo-angulo,
    I apologize, I'm a bit unclear on the nature and scope of the issue you are describing. If you are saying that you are getting an error code (3004) when you try to restore your iPhone (because you could not remember your passcode), you may find the information and troubleshooting steps outlined in the following articles helpful:
    Resolve iOS update and restore errors in iTunes - Apple Support
    Get help with iOS update and restore errors - Apple Support
    Sincerely,
    - Brenden

  • Please help me to format my laptop hp pavilion dv6 Windows 7 Home premium 64 bit?

    Please help me to format my laptop hp pavilion dv6 Windows 7 Home premium 64 bit?

    Hi,
    There are Three main ways to restore your notebook to format your HDD and return the notebook to its 'Factory Condition' - see the document on the link below.
    Performing An HP System Recovery - Windows 7.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Help by date format in UIX/XML

    In UIX/XML I would like to indicate the date fields in the format to 'DD.MM.YYYY '. I modify the properties of my view object and entity object in the window "structure window". It does not change view for anything.
    What wrong do I make?
    Who can help me please !!!!

    Please post what version of JDeveloper you are using. Also post a small sample application that shows what you are trying to do.
    I am not sure what you mean. Are you trying to display a date from the database, or have the user enter a date?
    The date format is determined from the client browser locale. It will default to the US date format mm/dd/yy unless the browser locale is overridden.
    If you want the user to enter a date, you should be using <dateField>. This will also expect mm/dd/yy unless you override it with a validater. Please refer to the UIX Element Reference. This documents <dateField>. The <onSubmitValidater> is a child of <dateField>, it is also documented in the Element Reference. <date> is the validater you want, it is a child of <onSubmitValidater>. You can specify a validation pattern.

  • Need Help on Date Format in Apps

    Hi,
    I am getting error message ORA-01861:literal does not match format string.
    My concurrent program has 5 parameters. one of this is Date datatype. I have attached FND_STANDARD_DATE value set for that parameter.
    when i submit the concurrent program, i am getting the above error.
    I wrote like this query in cursor declaration
    SELECT * FROM <TABLE>
    WHERE <COLUMN.DATE datatype,'DD/MM/YYYY'>(Retieving Database) = <PARAMETER.DATE.datatype,'RRRR/MM/DD'>(this is fnd_standard_date)
    Please any one guide me to solve above qurery.
    Thanks in advance

    hi
    i have similar to above thing
    i solved when i have to pass date value to pl/sql procedure that is in fnd_standard_date (yyyy/mm/dd hh24mi ss) format vice versa now i want to pass value from
    program paramter form value type as sql statment and default value as select func(sysdate) from dual
    i want to know that sysdate is what format is it same fnd_standard_date (but i tried it is showning APP-FND-01564: ORACLE error 904 in FDFGDF)
    i tried lot of thing no solution
    please help me
    in this regard
    thankd in advance ....

  • PLEASE HELP: How to format ext HD with Disk Utilities (FAT32 format)

    Hi,
    Please help. I need to format a 360 GB Lacie Hard-drive on FAT32 format. How can I do it with the Disk Utilities Application? I tried but only see Apple extended, extended (journaled), MS-dos, and others, but no FAT32. Also, if the Hard drive has 20 GB of documents, can a format the resto of the drive and leave this info intact? If so how can I do it. Thanks so much. I appreciate your help.
    MacBook Pro   Mac OS X (10.4.3)  

    You have to backup any data on the hard drive first.
    Formatting erases anything on the partition which in your case is the entire hard drive. It is possible to create more than one partition on the hard drive but that process will also delete any data on the hard drive.

  • Helps on date format

    Hi all,
    I got the column in table A where the date format is dd/mm/yyyy ( 01/03/2005), and another table B where the date format is dd/mm/yyyy HH24:MI:SS. So in order to let the two table to talk to each other, I hv the following query
    B.transaction_date >= TO_DATE(A.start_date , 'DD-MON-RRRR HH24:MI:SS')
    B.transaction_date <= TO_DATE(A.end_date, 'DD-MON-RRRR HH24:MI:SS')
    I hv problem with the end result b'cos of the date format in table A is dd/mm/yyyy whereas the transaction_date in table B has the format with time. How can I format or convert the date in the table B to be in defaulted time such as A.start_date 00:00:00 and b.end_date 23:59:59 ??
    How to format this ? please helps. Thanks
    Rgds
    Lim

    Hello
    Are the transaction_date, start_date and end_date columns all DATE data types?
    If so, all DATE columns have the time component but it may be truncated i.e. set to 00:00:00. To do a date range in your case you could do something like:
         B.transaction_date >= A.start_date
    AND
         B.transaction_date < A.end_date + 1By using this construct you are forming a range between today at midnight and tonight at 23:59:59, so you don't have to worry about setting the time component on your end_date.
    HTH

  • Need help in date formatting

    Hi,
    I need to print date in the following format:
    Jan 21, 2007
    11:23 AM 21/01/2007
    21-01-2007 18:23
    Now as per condition of assignment the year, month, day and hour, min, sec all are entered as separate integer values.
    my code:
    import java.util.*;
    import java.text.*;
    public class stringToDate
    // Integer value of date and time variables
    int day=21;
    int month = 1;
    int year=07;
    int hour=18;
    int min=23;
    int sec=14;
    // Converting integer value into date
    public void convertIntoDate()
         String strTmp= day+"/"+month+"/"+year+" "+hour+":"+min+":"+sec;
         System.out.println("String: " + strTmp);
         DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
         try
              Date outDate = dateFormat.parse(strTmp);
              System.out.println("Converted: " + dateFormat.format(outDate));
         catch(Exception e){ System.out.println("Exception: " + e);}
    public static void main(String args[]) {
         stringToDate dF = new stringToDate();
         dF.convertIntoDate();
    }Now as per my code i am able to print in the following format:
    String: 21/1/7 18:23:14
    Converted: 21/01/0007 18:23:14
    But if i try to print in other formats it gives me following error message:
    Exception: java.text.ParseException: Unparseable date: "21/1/07"
    Please help me....

    vinee wrote:
    Hi,
    I tried different output format but still i'm facing the same issue
    Following the complete code and error message....
    import java.util.*;
    import java.text.*;
    public class stringToDate
    // Integer value of date and time variables
    int day=21;
    int month = 1;
    int year=07;
    int hour=18;
    int min=23;
    int sec=14;
    // Converting integer value into date
    public void convertIntoDate()
    DateFormat dateFormat;
    Date outDate=null;
    String strTmp= day+"/"+month+"/"+year+" "+hour+":"+min+":"+sec;
    System.out.println("Entered string for date: " + strTmp);
         // Format 01/01/0070 15:24:14
         dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
         try
         outDate = dateFormat.parse(strTmp);
         System.out.println("Converted into Date(dd/MM/yyyy HH:mm:ss): " + dateFormat.format(outDate));
         catch(Exception e){ System.out.println("Exception in format 1: " + e);}
         // Format Jan 21, 2007
         dateFormat = new SimpleDateFormat("EEE, MMM d, ''yyyy");
         try
         outDate = dateFormat.parse(strTmp);
         System.out.println("Converted into Date(EEE, MMM d, ''yyyy): " + dateFormat.format(outDate));
         catch(Exception fe)
         {System.out.println("Exception in format 2: " + fe);}
    public static void main(String args[]) {
              stringToDate dF = new stringToDate();
              dF.convertIntoDate();
    }Following is the error message:
    Entered string for date: 21/1/7 18:23:14
    Converted into Date(dd/MM/yyyy HH:mm:ss): 21/01/0007 18:23:14
    Exception in format 2: java.text.ParseException: Unparseable date: "21/1/7 18:23:14"
    Now as per the above error message format one is working fine but format 2(// Format Jan 21, 2007) have some issues...kind suggest.
    Edited by: vinee on Oct 2, 2008 4:23 AMPlease re-read my last reply.
    Once again : see [http://java.sun.com/docs/books/tutorial/i18n/format/simpleDateFormat.html]
    And your:
    int year=07; // should be:
    int year=2007;

  • Please Help PI Data Dependent Integration Builder Authorizations NOT Workng

    Dear Friends / Experts,
    I had spend many days and explored all Weblog  and links on this website and implemented all the steps required to acheive Data Dependent Integration Builder Security and I am not successful so far. I am just giving up now - Please Help Me ---
    As I said, I already read all the important Forum Links and SAP Web links and Followed Each and Every Step - service.sap.com/instguidesNW04 ® Installation ® SAP XI
    Security Requirement - Data Dependent/Object Level Authorizations in XI / PI
    In distributed teams or in a shared PI environment it might be necessary to limit authorization for a developer or a group of developers to only one Software Component or objects within a Software Component or to specific Configuration Objects.
    Our Environment - PI 7.0 SP 16
    Created a new role in the Integration Builder Design
    u2013Add Object Types of any Software Component and Namespace
    - Enable usage of Integration Builder roles in Exchange Profile
    Integration Builder u2013Integration Builder RepositoryParameter com.sap.aii.util.server.auth.activation to true
    Assign users to the newly created Integration Builder roles
    u2013Create dummy roles in Web AS ABAP, these roles are then available as groups in Web AS Java
    u2013Assign users to these roles
    u2013Assign the Integration Builder roles to the above groups in Web AS Java
    u2013Assign unrestricted roles to Super Users
    Please help - How to validate whether Data Dependent Authorizations are Activated?
    I am working with XI Developers and Basis Team and we did updated all the Required Exchange profile parameters.
    Per this Document - User Authorizations in Integration Builder Tools - Do we need to update the server.lockauth.activation in Exchange Profile. When We updated, It removed Edit Access from all XI Developers in PI
    In both the Integration Repository and the Integration Directory, you can define more detailed authorizations that restrict access to design and configuration objects.
    In both tools, you define such authorizations by choosing Tools ® User Roles from the menu bar. The authorization for this menu option is provided by role SAP_XI_ADMINISTRATOR_J2EE. Of course, this role should only be granted to a very restricted number of administrators. To activate these more detailed authorizations, you must set exchange profile parameter com.sap.aii.ib.server.lockauth.activation to true.
    The access authorizations themselves can be defined at the object-type level only (possibly restricted by a selection path), where you can specify each access action either individually as Create, Modify, or Delete for each object type, or as an overall access granting all three access actions.
    http://help.sap.com/saphelp_nw04/helpdata/en/f7/c2953fc405330ee10000000a114084/frameset.htm
    I was able to control display and maintain access from ABAP Roles, but completely failed to implement Integration Builder Security?
    Are there any ways to check Whether Data Dependent authorization or J2EE Authorizations are activated?
    Thanks a lot
    Satish

    Hello,
    so to give you status of our issue.
    We were able to export missing business component .
    But we also exported some interfaces after that and we had some return code 8, due  to objects still present in change list on quality system (seems after previous failed transports , the change list was not cleared completley...).
    So now we have checked that no objects is present in the change list of quality system and we plan to export again our devs on quality system.
    Hope after that no more return code 8 during imports and all devs transported correctly on quality system.
    Also recommending to read that, which is pretty good.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/7078566c-72e0-2e10-2b8a-e10fcf8e1a3d?overridelayout=t…
    Thanks all,
    S.N

  • 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

  • Required help with date format

    Hi All,
    I am calling a webservice from plsql, for this I am using UTL_DBWS package. I want to insert the format of date as 'YYYY-MM-DD' only. I used to_char(sysdate, 'YYYY-MM-DD') , but it is throwing error. Please suggest any solution.
    Thanks and Regards,
    Mahesh
    The error details are as follows
    ORA-29532: Java call terminated by uncaught Java exception: javax.xml.rpc.soap.SOAPFaultException
    Caught exception while handling request: invalid date: 25-NOV-08
    ORA-06512: at "SYS.UTL_DBWS", line 403
    ORA-06512: at "SYS.UTL_DBWS", line 400

    user6391695 wrote:
    Hi All,
    I am calling a webservice from plsql, for this I am using UTL_DBWS package. I want to insert the format of date as 'YYYY-MM-DD' only. I used to_char(sysdate, 'YYYY-MM-DD') , but it is throwing error. Please suggest any solution.What happens is...
    You convert sysdate into a string of the format YYYY-MM-DD and then you are passing that to a parameter that is a DATE datatype. When you do this oracle has to implicitly conver the string to the DATE datatype. It does this based on the NLS settings of the session which, I would guess, are not of the format YYYY-MM-DD, so it can't understand the string you have passed and fails to convert it to a date.
    Date formats are not something that is stored on the database (assuming you are correctly storing dates as DATE datatype). The format of dates is a display issue and something that should be handled by the user interface. The database stores data, just that, no display formats. ;)

  • Create unique Form ID - Help on Date Format in Concat

    I am having problems formating a date value in my concat statement.  I have tried to write is different ways and still can't seem to get the string correct.
    Ideally, I would like to change the date value to a Julian value for the form ID, but I would settle for just mmddyy value without the / or - in between.
    Codes I have tried w/out date format string
    JavaScript - Calculate
    Program.FormID.rawValue=Program.State.rawValue + Program.ProgramNumber.rawValue + Program.ProgramDate.formattedValue;
    Returns - MO1234Jul8,2010  
    -------------And--------------------
    Program.FormID.rawValue=Program.State.rawValue + Program.ProgramNumber.rawValue + Program.ProgramDate.rawValue;
    Returns - MO12342010-07-08
    FormCalc - Calculate 
    (This one has the current date as a value, but it changes the unique form ID when reopened on another day, that is why I am using ProgramDate)
    Concat(Date2Num(Date(), "ddmmyyy"),Program.State.rawValue, Program.ProgramNumber.rawValue)
    Returns - 0MO1234
    ----------- And --------------------
    if 
    (Program.ProgramNumber.rawValue ne null) then
    $.rawValue
    = CONCAT(Program.State.rawValue, Program.ProgramNumber.rawValue, Program.ProgramDate.formattedValue)
    else
    $.rawValue = ""
    endif 
    Returns - MO1234July8,2010  (formattedValue)
                  MO12342010-07-08 (rawValue)
    What would be the better  language to use, FormCalc or JavaScript for this example?
    I am not all that skilled at coding and use forums like this to help me, so I appreciate any help.
    Thanks in advance - Eve

    Date.prototype.yyyymmdd = function() {
       var yyyy = this.getFullYear().toString();
       var mm = (this.getMonth()+1).toString(); // getMonth() is zero-based
       var dd  = this.getDate().toString();
       return yyyy + (mm[1]?mm:"0"+mm[0]) + (dd[1]?dd:"0"+dd[0]); // padding
    Now, after having spliced the internal Date object, you can do this:
    d = new Date();
    d.yyyymmdd();
    The line above returns today's date: "20100709".

  • Help in date format for transaction F-01

    Hello Experts,
    I am currently modifying a report wherein it posts document using
    transaction F-01. Now, I am getting an error wherein it says:
    Direct input date: Date 04162007 is incorrect. The document has not
    been created.
    Now, how can I modify it in such a way that whatever format of the date is,
    it will be correctly translated to the proper format for F-01. For example,
    in my selection screen i enter it as 16.04.2007 and other users enter it as
    04/16/2007. Hope you can help me out here guys. Thank you and take care!

    Hai,
    You can enter any date format.
    But you have to validate the date format.
    The date format depends on the settings.
    The format code can be known by the <b>USR01</b> with <b>DATFM</b> field.
    So<b> select</b> that field value.
    <b>Depending</b> on that type(1 to 6)
    write your conversion code like:
    Case date_code.
      when 1.
         do convwersion here.  
      when 2.
    when 6.
         do convwersion here
    endcase.
    Hope now you can do with any date format.
    <b>Reward points if it helps you.</b>
    Regds,
    Rama chary.Pammi

Maybe you are looking for

  • Clients unable to connect and get DHCP - LAP1142N AP and 5508 WLC

    Hi, I have 19 locations, each with 1 or more LAP1142N AP's in FlexConnect mode, AP's are primed using CAPWAP to my 5508 WLC at the datacenter. The AP's join the WLC without issue every time. I have two WLAN's, one guest and one staff, the guest netwo

  • PDF Printer Page Size Limitation

    I have been creating documents in Microsoft Publisher 2007 & have been trying to convert them to PDF via the Acrobat PDF Maker. When I am dealing with 11x17 & Poster size (36"x48"), the PDFMaker gets into the Converting Process (60%) then displays th

  • Can't achieve 6GB/s with sata 3 HHDs

    Hi all, I just did my first MSI build on the 880GMA-e53. Using two WD sata 3 blue HDs, 500 GBs each configured in raid 0 using the Marvell SE9128 controller. Yes I'm on the correct sata ports, 7,8. Installed XP home 32 bit, partitioned the drive, the

  • Mobility Group Member Down Status

    The mobility group members from our guest controller have went into a down status twice since upgrading the 5508 WLC to software version 7.4.110.  What can we do to remedy the problem?

  • Dock notification on new msgs

    Hi. I am new to Mail (been using Entourage), and one thing keeps annoying me so much that i am thinking of switching back - that is, when i create a custom folder and attach a rule to it (for instance, i want messages from my GF to drop in this very