Documentation request: SQL default type in EOs 11.1.2.1

Hi all,
In JDeveloper 11.1.2.1, there is an option on an EO attribute to select "SQL" as the type for the default value. However, I can find no documentation on this (the online help does not mention it), nor am I able to get it to work. cf {thread:id=10206283}.
Can someone point to some documentation or explain how it is supposed to work?
John

John, good spot, I've lodged a documentation bug 13843102 against this.
CM.

Similar Messages

  • [svn] 1455: add sql date types and custom serialization tests

    Revision: 1455
    Author: [email protected]
    Date: 2008-04-29 11:56:59 -0700 (Tue, 29 Apr 2008)
    Log Message:
    add sql date types and custom serialization tests
    Modified Paths:
    blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/remotingService/dataTypes/DateTy pesTest.mxml
    Added Paths:
    blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/remotingService/dataTypes/MyFile Ref.as
    blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/remotingService/dataTypes/Proper tyProxyTest.mxml
    blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/remotingService/dataTypes/SQLDat eTypesTest.mxml

    Congrats to Shanky and Durval!
     SQL Server General and Database Engine Technical Guru - June 2014  
    Shanky
    SQL Server: What does Column Compressed Page Count Value Signify
    in DMV Sys.dm_db_index_physical_stats ?
    DB: "Interesting and detailed"
    DRC: "• This is a good article and provides details of each and every step and the output with explanation. Very well formed and great information. • We can modify the create table query with “DEFAULT VALUES". CREATE TABLE [dbo].[INDEXCOMPRESSION](
    [C1] [int] IDENTITY(1,1) NOT NULL, [C2] [char](50) NULL DEFAULT 'DEFAULT TEST DATA' ) ON [PRIMARY]"
    GO: "Very informative and well formed article as Said says.. Thanks for that great ressource. "
    Durval Ramos
    How to get row counts for all Tables
    GO: "As usual Durva has one of the best articles about SQL Server General and Database Engine articles! Thanks, buddy!" "
    Jinchun Chen: "Another great tip!"
    PT: "Nice tip" 
    Ed Price: "Good topic, formatting, and use of images. This would be far better if the examples didn't require the black bars in the images. So it would be better to scrub the data before taking the screenshots. Still a good article. Thank you!"
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • Retrieving PL/SQL Table Type returned by stored procedure using Java.

    Hi All,
    I am facing an issue in a Stored Procedure (SP) which returns Table Type, the PL/SQL complex type.
    Below mentioned is how my stored procedure looks like.
    CREATE OR REPLACE package sp_test_pkg as
    TYPE v_value_table_type is table of SW_VALID_CODE.swValue%Type
    index by binary_integer;
    v_swRMAStatus v_value_table_type;
    procedure sp_test
    (locale      in int,
              name      in SW_CODE.swName%Type,
              v_value_table out v_value_table_type,
    batch_size in int,
    out_batch_size in out int,
    status out int);
    end sp_test_lcode_code_pkg;
    My java program to access this stored procedure is as given below:
    import java.sql.*;
    import oracle.jdbc.driver.*;
    public class OracleTest {       
         public static void main(String args[]) {
         Connection con = null;
    OracleCallableStatement cstmt = null;
    String url = "url";
         String userName = "username";     
         String password = "password";
    try
              DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());     
              con = DriverManager.getConnection(url, userName, password);
         cstmt = (OracleCallableStatement)con.prepareCall("begin " +
              "sp_test_pkg.sp_test_pkg(?,?,?,?,?,?); end;");
              cstmt.setInt(1, 1);
         cstmt.setString(2, "Test");
              cstmt.registerOutParameter(3, OracleTypes.ARRAY);
              cstmt.setInt(4, 10);
              cstmt.setInt(5, 1);
              cstmt.registerOutParameter(5, Types.INTEGER);
              cstmt.registerOutParameter(6, Types.INTEGER);
              cstmt.execute();
    } catch(Exception ex) {
    ex.printStackTrace(System.err);
    } finally {
    if(cstmt != null) try{cstmt.close();}catch(Exception _ex){}
    if(con != null) try{con.close();}catch(Exception _ex){}
    When i execute this java program, i get the following error:
    java.sql.SQLException: Parameter Type Conflict: sqlType=2003
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:229)
         at oracle.jdbc.driver.OracleCallableStatement.registerOutParameterBytes(OracleCallableStatement.java:245)
         at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:389)
         at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:452)
         at OracleTest.main(OracleTest.java:49)
    I am not sure where i am going wrong. I have never worked on such complex types before. I want to retrieve the complex table type returned by the stored procedure using my java source code.
    Can anyone please help me out in resolving this issue?. This is very urgent.

    JDBC does not recognise types declared in PL/SQL. This is documented in the Dev Guide. [Find out more|http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96654/oraarr.htm#1057625].
    The only work around would be to build a wrapper which calls your existing PL/SQL procedures and returns a SQL type instead. Obviously not knowing your precise scenario I have no idea how much work this entails for you. It may be worth building a code generator.
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • Implementing First In First Out Behaviour Using PL/SQL object types

    Hi Friends,
    I have a Integer Array of type Varray, I want to implement first in first out behaviour using Pl/SQL object type.Please provide me some idea that i can proceed. If you can provide me any sample code or any documentation,i will be very much thankful to you.Eagerly waiting for your reply.
    Thanks

    basically i have to implement a queue using pl/sql object types to traverse a tree as we can implement stack (LIFO).
    I can give an example of Stack implementation...
    CREATE or replace TYPE IntArray AS VARRAY(50) OF INTEGER;
    CREATE or replace TYPE IntStack_O AS OBJECT (
    maximalSize INTEGER
    ,top INTEGER
    ,position IntArray
    ,MEMBER PROCEDURE initialize
    ,MEMBER FUNCTION full RETURN BOOLEAN
    ,MEMBER FUNCTION empty RETURN BOOLEAN
    ,MEMBER FUNCTION getAnzahl RETURN INTEGER
    ,MEMBER PROCEDURE push (n IN INTEGER)
    ,MEMBER PROCEDURE pop (n OUT INTEGER)
    CREATE or replace TYPE body IntStack_O AS
    MEMBER PROCEDURE initialize IS
    BEGIN
    top := 0;
    -- Call Constructor und set element 1 to NULL
    position := IntArray(NULL);
    maximalSize := position.LIMIT; -- Get Varray Size
    position.EXTEND(maximalSize -1, 1); -- copy elements 1 in 2..50
    END initialize;
    MEMBER FUNCTION full RETURN BOOLEAN IS
    BEGIN
    RETURN (top = maximalSize); — Return TRUE when Stack is full
    END full;
    MEMBER FUNCTION empty RETURN BOOLEAN IS
    BEGIN
    RETURN (top = 0); — Return TRUE when Stack is empty
    END empty;
    MEMBER FUNCTION getAnzahl RETURN integer IS
    BEGIN
    RETURN top;
    END;
    MEMBER PROCEDURE push (n IN INTEGER) IS
    BEGIN
    IF NOT full
    THEN
    top := top + 1; — Push Integer onto the stack
    position(top) := n;
    ELSE
    –Stack ist voll!
    RAISE_APPLICATION_ERROR(-20101, ‘Error! Stack overflow. ‘
    ||’limit for stacksize reached.’);
    END IF;
    END push;
    MEMBER PROCEDURE pop (n OUT INTEGER) IS
    BEGIN
    IF NOT empty
    THEN
    n := position(top);
    top := top -1; — take top element from stack
    ELSE
    –Stack ist leer!
    RAISE_APPLICATION_ERROR(-20102, ‘Error! Stack underflow. ‘
    ||’stack is empty.’);
    END IF;
    END pop;
    END;
    Now if i run this..i will be getting the following output...
    DECLARE
    stack intstack_o := intstack_o(NULL,NULL,NULL);
    a INTEGER;
    BEGIN
    stack.initialize;
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    stack.push(1111);
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    stack.push(1112);
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    stack.push(1113);
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    stack.pop(a);
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    dbms_output.put_line(a);
    stack.pop(a);
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    dbms_output.put_line(a);
    stack.pop(a);
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    dbms_output.put_line(a);
    stack.pop(a);
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    dbms_output.put_line(a);
    END;
    Output...
    Anzahl: 0
    Anzahl: 1
    Anzahl: 2
    Anzahl: 3
    Anzahl: 2
    1113
    Anzahl: 1
    1112
    Anzahl: 0
    1111
    Above is the Stack (Last In First Out) Implementations of integer array.Now my Requirement is Queue(First In First Out) Implementation of Integer array.

  • PL/SQL Object Type - Java oracle.jbo.domain

    PL/SQL Object Type <-> Java oracle.jbo.domain
    can anybody help me, getting my domains to work?
    Following scenario:
    in pl/sql we have an object type called MULTI_LANGUAGE. This type is used for storing multilingual texts as nested table in one(!) column.
    So the object MULTI_LANGUAGE contains a member variable LANGUAGE_COLLECTION of type LANGUAGE_TABLE, which itself is a nested table of objects
    of the type LANGUAGE_FIELD (this again is only a language id and the corresponding content)
    Also the methods setContent(langID, langContent) and getContent(langId) are defined on Object MULTI_LANGUAGE.
    For example: Table having primary key, 2 other columns and one column of object type MULTI_LANGAGE (=nested table of objects)
    |ID|Column1|Column2|  multilingual Column  |
    |--|---------------------------------------|
    |  |       |       |  -------------------  |
    |  |       |       | | 1 | hello         | |
    |  |       |       |  -------------------  |
    |1 | foo   | bar   | | 2 | hallo         | |   <- Row Nr 1
    |  |       |       |  -------------------  |
    |  |       |       | | 3 | ola           | |
    |  |       |       |  -------------------  |
    |--|-------|-------|-----------------------|
    |  |       |       |  -------------------  |
    |  |       |       | | 1 | world         | |
    |  |       |       |  -------------------  |
    |2 | abc   | def   | | 2 | welt          | |   <- Row Nr 2
    |  |       |       |  -------------------  |
    |  |       |       | | 3 | ???  ;-)      | |
    |  |       |       |  -------------------  |
    |--|-------|-------|-----------------------|Now i've tried to modell this structure as an oracle.jbo.domain.
    class MultiLanguage extends Struct having this StructureDef:
    attrs[(0)] = new DomainAttributeDef("LanguageColl", "LANGUAGE_COLL", 0, oracle.jbo.domain.Array.class, 2003, "ARRAY", -127, 0, false, "campusonlinepkg.common.LanguageField");
    and
    class LanguageField extends Struct having this StructureDef:
    attrs[(0)] = new DomainAttributeDef("Id", "ID", 0, oracle.jbo.domain.Number.class, 2, "NUMERIC", -127, 0, false);
    attrs[(1)] = new DomainAttributeDef("Content", "CONTENT", 1, java.lang.String.class, 12, "VARCHAR", -127, 4000, false);
    Is there anything wrong with this StructureDef?
    When running the BC-Browser with -Djbo.debugoutput=console -Djbo.jdbc.driver.verbose=true parameters I get suspect warnings when browsing the records
    [196] Executing FAULT-IN...SELECT NR, NAME FROM B_THESAURI BThesauri WHERE NR=:1
    [197] SQLException: SQLState(null) vendor code(17074)
    [198] java.sql.SQLException: Ungültiges Namensmuster: XMLTEST.null
    ...snip: detail of stack...
    [240] SQLException: SQLState(null) vendor code(17060)
    [241] java.sql.SQLException: Deskriptor konnte nicht erstellt werden: Unable to resolve type "null"
    ...snip: detail of stack...
    [280] Warning:No element type set on this array. Assuming java.lang.Object.
    (XMLTEST is the name of the schema)
    Seems as if the framework can't read the TypeDescriptor or does not know which descriptor to read (XMLTEST.null??)
    Do I have to implement my own JboTypeMap?
    Please help, I'm stuck.
    Thanks in advance, Christian

    Thanks for your suggestion, but it seems to me as if there is one level missing.
    in pl/sql I have following structure:
    Struct MULTI_LANGUAGE (Object type) - outermost
      Array LANGUAGE_TABLE (nested table type)
        Struct LANGUAGE_FIELD (Object type simple) - innermostthe reason why i had to wrap another struct around the array was because it is not possible to define methods on a nested table. this is only possible on objects.
    on the outermost object type (which holds the array of language fields) I needed to define following 2 methods for direct access:
    getContent (langId in number) returns varchar2
    setContent (langId in number, langContent in varchar2)
    I would like to rebuild the same structure in java, because newly written java code should live in perfect harmony with legacy pl/sql code ;-)
    Both applications (Java and pl/sql) have to access the same data as long as migration to java goes on.
    Is this nested structure too much for a Domain?
    Any other suggestions?
    Thanks again, Christian

  • Creating tabs for a single SQL report type region

    I would like to find a way to use tabs in a single SQL report type region. The problem I have is that there are too many columns to be displayed so the report looks very cluttered. I would like to find a way to assign say columns 1 - 5 to tab 1, 6-10 to tab 2 etc so the user can find the columns they need by simply clicking on the various tabs without having to execute the query again.
    I have looked at JQuery tabs but that seems to only be applicable to more or less unrelated regions. I tried to create different regions using the same query with different columns and that kind of works, but the regions don't stay in sync if say the user change the order for column 2 in tab 1, when they click on tab 2 everything displays in a different order.
    Another wrinkle is that this is an updatable report so some of the columns are updatable.
    I also looked at the hide / display column solution which is described in a few threads and that may also sort of work, but it is also not quite what I am looking for.
    Any help is greatly appreciated

    Does anybody know if this can be accomplished using APEX? What I am really looking for is very similar to an old fashioned client / server screen developed using say Oracle Forms. Consider an order line screen where say columns line number, SKU and SKU description is to the left of the tabs so these columns are visible no matter which tab is active. Then the first tab has say pricing information including UOM, quantity, list price, unit selling price, price list. The next tab has say customer information including customer number, name, bill to and ship to addresses. the next tab has say shipping information with say the warehouse, shipping instructions and shipping method.

  • Passing parameters to PL/SQL table types

    Hi Everybody,
    I have one question about passing PL/SQL tables types and tabs as IN parameter in procedure.I am working in 11.2.0.2.0 environment. I am stuck on how to pass those values to procedure.Please find below more details:
    Table 1:
    CREATE TABLE ITEMS
    ITEM_ID VARCHAR2(40 BYTE) NOT NULL,
    ITEM_NAME VARCHAR2(40 BYTE),
    SERIAL NUMBER(2),
    ADDED_ON DATE);
    Table 2:
    CREATE TABLE ITEM_ACTIVITY_INFO
    ITEM_ID VARCHAR2(40 BYTE) NOT NULL,
    ACCOUNT_TYPE VARCHAR2(1 BYTE),
    ID_NUMBER NUMBER(3),
    ACTIVATION_DATE DATE);
    Table 3:
    CREATE TABLE ITEM_GROUP
    GROUP_ID NUMBER(2) NOT NULL,
    ITEM_ID VARCHAR2(40 BYTE),
    GROUP_TYPE VARCHAR2(20 BYTE),
    GROUP_DATE DATE);
    Table 4:
    CREATE TABLE ITEM_ADDRESS
    GROUP_ID NUMBER(2) NOT NULL,
    NAME VARCHAR2(60 BYTE),
    ADDRESS VARCHAR2(100));
    Following types are created:
    CREATE OR REPLACE TYPE ITEMS_TYPE AS OBJECT
    ITEM_ID VARCHAR2(40 BYTE),
    ITEM_NAME VARCHAR2(40 BYTE),
    SERIAL NUMBER(2),
    ADDED_ON DATE);
    CREATE OR REPLACE TYPE ITEM_ACTIVITY_TYPE AS OBJECT
    ITEM_ID VARCHAR2(40 BYTE),
    ACCOUNT_TYPE VARCHAR2(1 BYTE),
    ID_NUMBER NUMBER(3),
    ACTIVATION_DATE DATE);
    CREATE OR REPLACE TYPE ITEM_GROUP_COMP_TYPE AS OBJECT
    GROUP_ID NUMBER(2) NOT NULL,
    ITEM_ID VARCHAR2(40 BYTE),
    GROUP_TYPE VARCHAR2(20 BYTE),
    GROUP_DATE DATE
    ITEM_ADDRESS_IN ITEM_ADDRESS_TYPE);
    CREATE OR REPLACE TYPE ITEM_ADDRESS_TYPE AS OBJECT
    GROUP_ID NUMBER(2),
    NAME VARCHAR2(60 BYTE),
    ADDRESS VARCHAR2(100));
    CREATE OR REPLACE TYPE ITEM_GROUP_COMP_TAB AS TABLE OF ITEM_GROUP_COMP_TYPE;
    Create or replace procedure ITEM_ADD_CHANGE(
    ITEM_IN IN ITEMS_TYPE,
    ITEM_ACTIVITY_IN IN ITEM_ACTIVITY_TYPE,
    ITEM_GROUP_IN IN ITEM_GROUP_COMP_TAB,
    ITEM_OUT IN OUT ITEMS.ITEM_ID%TYPE);
    Above are the paramteres we are passing to procedure.
    I need help in how to pass parameters to above procedure. All comments and responses will be highly appreciated. Thanks everyone for going through the post. Please let me know if more more information is required on this problem.
    Regards
    Dev

    Billy  Verreynne  wrote:
    Types used in this fashion, only make sense if the table is based on the type. It makes very little sense to have a table structure and then to duplicate the structure using a type.
    The 2 structures may be defined the same. But they are NOT interchangeable and requires one to be converted to the other to use. This is not sensible in my view. It is far easier in that case to simply use the PL/SQL macro +%RowType+ to create a duplicate structure definition - one that can natively be used for touching that table, without conversions required.
    If you do want to use types, define the type, then define the table of that type, adding the required constraints (pk, fk, not null, check) to the table's definition.Billy:
    Just curious, why do you say it makes very little sense to have a type modeled on a table? I do that a lot. In my case, I am getting the values from an external program, not building them manually, but it makes a lot of sense to me.
    One application where I do this a lot has a java front-end that parses HL7 messages. Each message contains at least minimal information about a variable number of entities (and often several rows for an entity) in the database, and must be processed as a single atomic trasnaction. So, rather than have potentially hundreds of parameters to the "main" driver procedures for different message types I created a set of types more or less identical to the tables representing the entities. The java program parses the mesasge and populates the type, then calls the appropriate stored procedure for the message type passing in the populated types. My stored procedure then does inserts/updates or deletes as appropriate over potentially dozens of tables.
    John

  • Presentation Variable in the SQL default section in the dashboard prompt

    Hi Gurus,
    I have two prompts and two go buttons. First Go button is used to populate pv_category1 presentation variable.
    category_column --> pv_category1--> 1st Prompt
    Product_Column --> pv_product2 --> 2nd Prompt
    I want to set the default for the 2nd Prompt depending on the 1st Prompt ( Category) chosen by the user.
    In the SQL default --> i have typed in the below Query.
    *Select TableName.Product_Column from Subject_Area where category_column = '@{pv_category1}'*
    The Problem is that i dont get any default value for 2nd Prompt after choosing the First prompt and hitting the GO Button.
    If i hardcode the value in @{pv_category1} ...
    for eg
    Select TableName.Product_Column from Subject_Area where category_column = 'Incidents' i get the corresponding value as default.
    But i want this 2nd prompt (product) to dyamically default depending on the 1st prompt (category) chosen by the user.
    I am using OBIEE 10.1.3.4 and i have googled a lot on this topic...
    can we not use Presentation variable in the SQL default section of the Dashboard Prompt?
    Any help in this regard would be highly appreciated.
    Thanks
    Ashish

    Thanks for the Quick Reply.
    But the functionality that i want to achieve is the default value in the 2nd column (out of many values for 2nd column) based on the 1st column chosen by the USER. for eg we have two columns in our database ie category and Product.. Data goes like this
    category ProductName
    Incidents --- A
    Incidents --- B
    Incidents --- C
    Changes --- D
    Changes --- E
    Projects --- M
    Projects --- N
    Projects --- O
    Projects --- P
    If the User chooses Incidents in the first prompt then the default in the 2nd prompt should be B ( out of A,B,C Values available in the 2nd prompt)....
    Checking the constraint checkbox doesnt solve the default problem...
    Thanks
    Ashish

  • How to submit request with default language as 'American English' in other non-english language sessions.

    Dear All,
    Kindly suggest how to submit request with default language as 'American English' in other language sessions (Ex: Arabic).
    R12: 12.1.3
    The issue is we created function using 'arabic' text in it, which runs perfect in the english session, but doesnt gets value in the arabic session.
    So we decided to make the submit request with default language as 'American English'.
    Below is the function. Kindly note that SEGMENT1 is not linked to any valueset.
    CREATE OR REPLACE FUNCTION F_GET_OLD_LEAVE(P_PERSON_ID NUMBER)
      RETURN NUMBER IS
      V_DAYS NUMBER;
    BEGIN
      select
         SUM(EXCD_DAYS)
        INTO V_DAYS
          FROM (
                SELECT
      --            NVL(SEGMENT5, 'تجاوز') Late_type,
      --             SEGMENT1 NOTES,
      --            ACTUAL_TERMINATION_DATE,
    (CASE 
    WHEN NVL(SEGMENT5,'تجاوز') not in ( 'تجاوز' ,'إجازة غير مدفوعة') and segment1 not in ('إجازة غير مدفوعة') THEN 0
    --WHEN SEGMENT1  like 'إجازة غير مدفوعة' THEN
    --TO_DATE(to_date(SUBSTR(segment3, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR') -
    --TO_DATE(to_date(SUBSTR(segment2, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR') +1
    when segment1 not in('بدل نقدي','إجازة غير مدفوعة') and segment4 is null then
    TRUNC(to_date(ACTUAL_TERMINATION_DATE,'DD/MM/RRRR'))- TO_DATE(to_date(SUBSTR(segment3, 1, 10),'DD/MM/YYYY'), 'DD/MM/RRRR')-1 
    when segment1 in('إجازة غير مدفوعة') and segment4 is null then
    TRUNC(to_date(ACTUAL_TERMINATION_DATE,'DD/MM/RRRR'))- TO_DATE(to_date(SUBSTR(segment2, 1, 10),'DD/MM/YYYY'), 'DD/MM/RRRR')
    WHEN SEGMENT1 <> 'إجازة غير مدفوعة' and
                TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')  <
                TO_DATE(to_date(SUBSTR(segment3, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR') 
    THEN 0
      WHEN SEGMENT1 <> 'إجازة غير مدفوعة' and
                TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')  -
                TO_DATE(to_date(SUBSTR(segment3, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')  <=1
    THEN 0
    WHEN SEGMENT1 like  '%بدل نقدي%' then 0
               -- TO_DATE(to_date(SUBSTR(segment2, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')  
      WHEN SEGMENT1 like '%إجازة سنوية%' and segment5 in( 'إجازة غير مدفوعة','تجاوز')and
                TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')  -
                TO_DATE(to_date(SUBSTR(segment3, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')  >=2
                then
                TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')  -
                TO_DATE(to_date(SUBSTR(segment3, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR') -1
    WHEN SEGMENT1 like '%إجازة حج%' and segment5 in('إجازة غير مدفوعة','تجاوز') and
                TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')  -
                TO_DATE(to_date(SUBSTR(segment3, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')  >=2
                then
                TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')  -
                TO_DATE(to_date(SUBSTR(segment3, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR') -1
    when SEGMENT1 LIKE '%إجازة غير مدفوعة%' AND
    TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR') -
    TO_DATE(to_date(SUBSTR(segment3, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')<=1
    THEN
    TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR') -
    TO_DATE(to_date(SUBSTR(segment2, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')
    when SEGMENT1 LIKE '%إجازة غير مدفوعة%' AND SEGMENT5 NOT IN('تجاوز','إجازة غير مدفوعة') AND
    TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR') -
    TO_DATE(to_date(SUBSTR(segment3, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')>=2
    THEN
    TO_DATE(to_date(SUBSTR(segment3, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR') -
    TO_DATE(to_date(SUBSTR(segment2, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')+1
    when SEGMENT1 LIKE '%إجازة غير مدفوعة%' AND SEGMENT5  IN('تجاوز','إجازة غير مدفوعة') AND
    TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR') -
    TO_DATE(to_date(SUBSTR(segment3, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')>=2
    THEN
    TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR') -
    TO_DATE(to_date(SUBSTR(segment2, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')
    WHEN
               EXTRACT(YEAR FROM TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR'))  <>
               EXTRACT(YEAR FROM TO_DATE(to_date(SUBSTR(segment3, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')) 
    THEN
       TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'),'DD/MM/RRRR') -
       TO_DATE(to_date(SUBSTR(segment3, 1, 10),'YYYY/MM/DD'),'DD/MM/RRRR') - 2
    WHEN 
            to_char(to_date(SUBSTR(SEGMENT3, 1, 10),'YYYY/MM/DD'),'DD/MM/YYYY') =
            to_char(to_date(SUBSTR(SEGMENT4, 1, 10),'YYYY/MM/DD'),'DD/MM/YYYY')
            THEN  0
    WHEN
    EXTRACT(DAY FROM TO_DATE(to_date(SUBSTR(segment3, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR'))= 31
      THEN
         TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR') -
      TO_DATE(to_date(SUBSTR(segment3, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')-1
    --------------------------------------------when enddate is NULL---------------------------------------------------------------------------------
    -- WHEN segment3 IS NULL THEN round(TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'),'DD/MM/RRRR') -
    --  TO_DATE(to_date(SUBSTR(segment2, 1, 10),'YYYY/MM/DD'),'DD/MM/RRRR'))
    WHEN segment3 IS NULL THEN ((EXTRACT(MONTH FROM TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')) -
            EXTRACT(MONTH FROM TO_DATE(to_date(SUBSTR(segment2, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR'))) * 30) +
             (EXTRACT(DAY FROM TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')) -
            EXTRACT(DAY FROM TO_DATE(to_date(SUBSTR(segment2, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')))
    -----***********************************when segment1**********************************--------------------------
    WHEN SEGMENT1  like '%صادف%' THEN ((EXTRACT(MONTH FROM TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')) -
            EXTRACT(MONTH FROM TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR'))) * 0) +
             (EXTRACT(DAY FROM TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')) -
            EXTRACT(DAY FROM TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')))
      WHEN 
        EXTRACT(YEAR FROM TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')) =
        EXTRACT(YEAR FROM TO_DATE(to_date(SUBSTR(segment3, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR'))
    THEN
          ((EXTRACT(MONTH FROM TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')) -
            EXTRACT(MONTH FROM TO_DATE(to_date(SUBSTR(segment3, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR'))) * 30) +
           (EXTRACT(DAY FROM TO_DATE(to_date(SUBSTR(segment4, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')) -
            EXTRACT(DAY FROM TO_DATE(to_date(SUBSTR(segment3, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')))-1
             ELSE 0
             END )EXCD_DAYS
                 FROM HR.PER_ANALYSIS_CRITERIA C,
                   PER_ALL_PEOPLE_F         PPF,
                    PER_PERIODS_OF_SERVICE PPPS,
                   PER_PERSON_ANALYSES      T ,
                   fnd_id_flex_structures_vl f
                 WHERE 1 = 1
               AND T.ANALYSIS_CRITERIA_ID = C.ANALYSIS_CRITERIA_ID
               AND PPF.PERSON_ID = T.PERSON_ID
               and ppps.PERSON_ID=ppf.person_id(+)
              and   ppps.ACTUAL_TERMINATION_DATE           BETWEEN  ppf.effective_start_date and nvl(ppf.effective_end_date, to_date('31/12/4712', 'DD/MM/YYYY'))
              -- AND C.ID_FLEX_NUM = 50318
               and c.id_flex_num = f.id_flex_num
        AND f.id_flex_code = 'PEA' 
          and f.ID_FLEX_STRUCTURE_NAME =  'XX_Old_Leave_Details'
        AND PPF.person_id = P_PERSON_ID
    AND T.DATE_FROM>=( select
    TO_DATE(to_date(SUBSTR(xx.global_value, 1, 10),'YYYY/MM/DD'), 'DD/MM/RRRR')
    FROM
    ff_globals_f xx
    where xx.GLOBAL_NAME='XX_NEW_LEAVES_DATE_FROM'
    AND SYSDATE BETWEEN XX.EFFECTIVE_START_DATE AND XX.EFFECTIVE_END_DATE)
    and substr(c.segment1,1,10)>=
               select substr(xx.global_value,1,10)
    FROM
    ff_globals_f xx
    where xx.GLOBAL_NAME='XX_NEW_LEAVES_STD'
    AND SYSDATE BETWEEN XX.EFFECTIVE_START_DATE AND XX.EFFECTIVE_END_DATE
      RETURN NVL(V_DAYS, 0);
    EXCEPTION
      WHEN OTHERS THEN
        RETURN 0;
    END;
    Thanks in Advance.
    Regards,
    Afzal.

    Dear All,
    I found the solution for the above function.
    In the same function I removed the static arabic values replacing with code values from the value set.
    In my scenario there is a value set where some of these values exists, and other we can add there.
    Kindly let me know if someone was successful by using the arabic text in the coding and defaulting the language in conc prog as English.
    Thanks a lot.
    Regards,
    Afzal.

  • Bug in oracle portal: problem in pl/sql item type

    I created a pl/sql item type... based on a stored proc... whenever I make a change to the store proc I have to readd the item based on this item type since the result on the item type is not updated is this some bug in oracle portal

    I created a pl/sql item type... based on a stored proc... whenever I make a change to the store proc I have to readd the item based on this item type since the result on the item type is not updated is this some bug in oracle portal

  • PL/SQL table type in Forms 4.5

    Hi
    I am trying to use a pl/sql table type variable in Oracle forms 4.5 . I am able to compile this and run it on the database that the application connects to but in forms , it gives me a compilation error.
    Is there some restriction on using this datatype in forms 4.5
    Following is the syntax I am using:
    TYPE block_list_type IS TABLE of VARCHAR2(200) INDEX BY BINARY_INTEGER;
    block_list block_list_type;
    I get fatal syntax error even though the syntax is correct(checked it on the database).
    please let me know if I am doing something wrong.
    thanks a lot

    That explains it!!
    Thanks. My company is on oracle 10.7 and is too reluctant to move to higher versions. They finally bought I2 and are developing their own custom java applications and will phase out 10.7 but are not willing to move to the next version of Oracle !!
    Seems like they are done with Oracle .
    thanks for the input anyways.

  • Dbms_xmlgen using pl-sql record type

    Hi
    I want to pass pl-sql record type and want to generate xml. Can dbms_xmlgen access pl-sql record type instead of query?
    OR please let me know any other package to pass pl-sql record type and generate XML.
    Thanks in advance

    Can dbms_xmlgen access pl-sql record type instead of query?Don't think so, but can't you pass the individual record components:
    SQL> declare
      type rec is record
        a   int,
        b   varchar2 (30)
      r     rec;
      ctx   int;
      x     xmltype;
    begin
      r.a := 1;
      r.b := 'Michael';
      ctx := dbms_xmlgen.newcontext ('select :x id, :y name from dual');
      dbms_xmlgen.setbindvalue (ctx, 'x', r.a);
      dbms_xmlgen.setbindvalue (ctx, 'y', r.b);
      x := dbms_xmlgen.getxmltype (ctx);
      dbms_output.put_line (x.getstringval ());
      dbms_xmlgen.closecontext (ctx);
    end;
    <ROWSET>
    <ROW>
      <ID>1</ID>
      <NAME>Michael</NAME>
    </ROW>
    </ROWSET>
    PL/SQL procedure successfully completed.?

  • Mapping SQL data types (especially SMALLINT) to Java classes

    I want to know the reason for a certain pair of exceptions in JDBC�s mapping of SQL data types to Java classes.
    Sun�s web site ( http://java.sun.com/j2se/1.4.2/docs/guide/jdbc/getstart/mapping.html ), Sybase�s site, and other sites contain mappings from SQL data types to Java primitive data types and/or Java classes. On that Sun web page, Section 9.9.1 maps mostly to Java primitive data types, and Section 9.9.3 maps mostly to Java classes. For the SQL data types that map to both primitive data types and classes, the class is typically the wrapper class of the primitive data type. For example, SQL�s DOUBLE data type maps to both the double primitive data type and its wrapper class (Double). However, Section 9.7 of that Sun web page says that there are exceptions for SQL�s TINYINT and SMALLINT. As expected, they map to the byte and short primitive data types, but they map to the Integer class, not the Byte and Short classes (which are the wrapper classes for byte and short). The web page does not state the reason for this pair of exceptions. It seems to me that SMALLINT data would either work for both short and Short or fail for both short and Short. I don�t see why it would work for short but fail for Short (as the web page implies).
    Can anybody think of a reason for the pair of exceptions? Thanks.

    ghs wrote:
    1) If a DBMS deals with the short and byte primitive data types (as the various web pages imply that it does), then why would it not deal with the Short and Byte wrapper classes?As another guess, because conversions get a little weird in java. Or at least they did in the past. As I recall (with not a lot of clarity) it is possible to do something like pass a perfectly valid string value into a short and get an exception. Whereas using Integer and then converting to Short works.
    Keep in mind that these are guesses.
    3) What I really want to know is this: If I use wrapper classes of Short and Byte (instead of Integer), what will be the harmful consequences (IF ANY)? So far, I have done some trivial testing with a Short for a SMALLINT column (I have not yet tried any TINYINT columns), and it seems to be working.I considered it risky to not test all target databases and drivers.
    Obviously testing will reveal problems.
    If you don't want to test then you might want to stick with integers.

  • Passing PL/SQL table type as IN Parameter to DB Adapter

    Hi,
    I have an requirement to pass multiple record values(array of values) to an API from BPEL process.
    For this,
    1) I have created a package procedure having PL/SQL table type variable as IN Parameter.
    2) In the BPEL process, created a DB adpater pointing to the above API.(Created wrapper API impicitly)
    When I intiated the BPEL process passing multiple values, the API is taking only the first value, ignoring rest of the values.
    Any reason, why only the first value is accepted by the API ?
    Thanks,
    Rapp.

    If I understand correctly, JPublisher generates a wrapper API for an underlying API that takes a PL/SQL table as an IN parameter. The wrapper will generate and use a SQL nested table as the type for the IN parameter of the wrapper procedure.
    The DB adapter DOES support nested tables, varrays, and objects as IN parameters of an API. The problem you are seeing is most likely due to the way you are modeling your BPEL process, specifically with respect to your Assign activities.
    When you Assign TO an IN parameter, make sure that you drill down all the way and choose the parameter name in the InputParameters root element. Similarly, when you Assign FROM the API value, you must drill down and choose the name of the OUT parameter in the OutputParameters root element.
    In a Transform activity, you would use the FOR construct on the target side to get the values of the nested table or varray from the source side.

  • User domain\SPFservice is not authorized to perform request using authentication type Negotiate

    Hi,
    I have installed WAP/SPF in the same domain via express installation.  The SPF domain service account is sysadmin on the SPF database.  The SPF domain service account is running as identity in IIS application pool.  I have registered SPF in
    WAP via SPFcomputeraccount\LocalSPFaccount.  The LocalSPFaccount is member of the 4 local groups created by the SPF setup.  The domain SPF service account is member of the VMM administrators.
    When a new tenant want to subscribe to a hosting plan I get an error "One or more errors occurred while contacting the underlying resource providers. The operation may be partially completed. Details: Failed to create subscription".
    When I look in the eventviewer of the SPF server in ManagementODataService, I can see "User domain\SPFservice is not authorized to perform request using authentication type Negotiate".
    SPF/VMM are both on the latest update rollup.  The VMM console is also updated on the SPF server. 
    I can successfully reproduce the troubleshooting steps from http://blogs.technet.com/b/privatecloud/archive/2013/11/08/troubleshooting-windows-azure-pack-spf-amp-vmm.aspx.

    Hi,
    During the install it is also asking you to specify groups during the installation (4 x) Is the user you specified als spf runas account also member of those group in the AD?
    So you have 4 groups created on the local box by the installation. But also 4 specified during the installation. Check if the account is member of those group(s) as well, reboot the spf and you should be up and running.
    Best regards, Mark Scholman. Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

Maybe you are looking for

  • How can I determine what computers are authorized on my iTunes account?

    How can I determine what computers have been authorized on my iTunes account?  I've reached my limit and now I'd like to deauthorize one computer. Thanks, Jerry

  • FTP Atapter

    Hello, Can some one explain - how the FTP adapter in BPEL works: 1. How delivery of incoming & outgoing documents is guaranteed? 2. How exceptions are handled bidirectional, if some thing fails? 3. How security works? 4. Does BPEL pull the documents

  • I am unable to install Lightning calendar to Thunderbird 31.1.2/Windows 7 64bit

    I am unable to install Lightning calendar to Thunderbird 32.0.3/Windows 7 64bit. My original calendar dissapeared a while ago during an update. I have tried downloading lightning-3.3.sm+tb-windows.xpi, but every time I try to run it, all it does is a

  • 3.0 Messed Phone Up Please Help

    I downloaded the 3.0 upgrade yesterday for iPhone 3G which I bought from AT&T and I am now having major problems. When I first downloaded it and started using it everything was much slower and there was a lag between when I would press something and

  • How to disable back to my mac automatic log in

    When I used screen sharing in OS Lepoard I would have to connect using my user id and password (different from Apple ID).  But now in OS Lion when I use file sharing or screen sharing it connects to the remote computer automatically and uses my Apple