Error in documentation of PL/SQL on multidimensional holdings?

Hello

It is a small issue, but I think that the following PL/SQL reference 11.2 (http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/composites.htm#BABIBDDG), is to the wrong tables nested data types (and variables created of these types).
Surely, no matter where you see "INDEX BY...» ', it is an associative array. Therefore, ntb1 is an associative array of associative arrays, and ntb2 is an associative array of varrays. Am I wrong?

Thank you
Jason
Example 5–13 Nested Tables of Associative Arrays and Varrays of Strings
DECLARE
  TYPE tb1 IS TABLE OF INTEGER INDEX BY PLS_INTEGER; -- associative arrays
  v4 tb1;
  v5 tb1;
  TYPE ntb1 IS TABLE OF tb1 INDEX BY PLS_INTEGER; -- nested table of
  v2 ntb1; -- associative arrays
  TYPE va1 IS VARRAY(10) OF VARCHAR2(20); -- varray of strings
  v1 va1 := va1('hello', 'world');
  TYPE ntb2 IS TABLE OF va1 INDEX BY PLS_INTEGER; -- nested table of varrays
  v3 ntb2;
BEGIN
  v4(1) := 34; -- populate associative array 
  v4(2) := 46456;
  v4(456) := 343;
  v2(23) := v4; -- populate nested table of associative arrays
  v3(34) := va1(33, 456, 656, 343); -- populate nested table of varrays
  v2(35) := v5; -- assign empty associative array to v2(35)
  v2(35)(2) := 78;
END;
/

>
It is a small issue, but I think that the following PL/SQL reference 11.2 (http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/composites.htm#BABIBDDG), is to the wrong tables nested data types (and variables created of these types).
Surely, no matter where you see "INDEX BY...» ', it is an associative array. Therefore, ntb1 is an associative array of associative arrays, and ntb2 is an associative array of varrays. Am I wrong?
>
Yes - the documentation is wrong on this point.

One of the main differences between an associative array and a nested table is how they are treated after creation if they have not yet been met. The table is considered to be EMPTY, while the nested table is treated as UNITIALIZED.

The doc says so
>
As a database, an associative array:

Is empty (but not zero) until that fill you
. . .
An uninitialized variable nested table is a collection of zero. You must initialize, either by making empty or by assigning a value not NULL.
>
You can see this particular difference with this code example.

DECLARE
  TYPE array_test1 IS table of VARCHAR2(15) index by PLS_INTEGER;
  my_array1 array_test1;

  TYPE nt_test1 IS TABLE OF VARCHAR2(15);  -- nested table type

  my_nt1 nt_test1;
BEGIN
--  dbms_output.put_line('array 1 [' || my_array1(0) || '].');

  dbms_output.put_line('nt 1 [' || my_nt1(0) || '].');

END;

The foregoing will give this exception:
>
ORA-06531: Reference to an uninitialized collection
ORA-06512: at line 11 level
>
If "uncomment you" the first line and comment on the second, you will get a different exception:
>
ORA-01403: no data found
ORA-06512: at line 9 level

Tags: Database

Similar Questions

  • Error-2147286787 installation of Microsoft Sql Native Client on Windows XP

    Hi all

    I'm having a problem with my sql Server 2005. When im clicking on the components of the server, tools, books online and samples, and license agreement for the popup
    and when I click on it it shows me "Microsoft Sql Native Client and Microsoft SQl Server 2005 Setup Support files" and when I click on install error messages r dispalyed:

    Microsoft Sql Native Client: An error has occurred during installation:
    Error-2147286787 installation of Microsoft Sql Native Client. See the log file for more information. An unexpected error has occurred.

    I installed IIS and .net framework 2.0, as im using the service don't pack 3 no need to Windows Installer. Is there a problem with my system, or is - this software problem.
    Please help my project happens and im stuck. Thanks in advance.

    Kind regards

    Rohit.

    Hello

    Given that the problem is related to SQL Server, I recommend that you post this question in the Instances of SQL Server.

  • Error occurs when you use SQL Server 2012 assessment vs window detail of the object in window 7 - KERNELBASE.dll exception 0xe0434352

    Hello

    Error occurs when you use SQL Server 2012 assessment vs window detail of the object in window 7.  I use the window of the object but the detail of the objects window arrives and immediately SQL Server stops with the error below and then opens again.  I didn't find any help with this specific error is but suspect there is a problem between SLQ Server 2012 et.NET Framework 4.  Unfortunately, I do not know what it takes in this regard.

    Thanks, Deb

    Event ID: 1000
    Task category: (100)
    Level: error
    Keywords: Classic
    User: n/a
    Computer: Deb - HP
    Description:
    Name of the failing application: Ssms.exe, version: 2011.110.3000.0, time stamp: 0x5081c1cd
    Name of the failed module: KERNELBASE.dll, version: 6.1.7601.18015, time stamp: 0x50b83c8a
    Exception code: 0xe0434352
    Offset: 0x0000c41f
    ID of the process failed: 0x13a8
    Start time of application vulnerabilities: 0x01ce609a6d3db991
    The failing application path: C:\tempSQLWOW\110\Tools\Binn\ManagementStudio\Ssms.exe
    Path of the failing module: C:\Windows\syswow64\KERNELBASE.dll
    Report ID: 1fb1cbfb-cc8e-11e2-b436-abd2bebb3f17

    Hi Claude,.

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the link below.

    http://social.technet.Microsoft.com/forums/en-us/category/SQLServer

    Good day!

    Answer please if you face concerns.

  • Table error ' can not analyze the SQL query!

    Hi all

    I created a view on my database called VIEW_MEMBER_PARTIC_PROJECTS

    If I run a query showing the results of the view:

    SELECT * FROM VIEW_MEMBER_PARTIC_PROJECTS

    I get the following data

    ProjectsParticipants
    131 S
    241
    319
    43
    53
    61
    72

    Now, I wanted to represent this diagram in the APEX so I created a graphic region and entered the Source query generator and the manufacturer produces the following code

    Select null, label projects, value1 Participant link

    of "SCHEMANAME." "" VIEW_MEMBER_PARTIC_PROJECTS ".

    With this code, I get an error:

    Cannot parse the SQL query!

    Select the link null, label projects, value1 "SCHEMANAME Participant." "" VIEW_MEMBER_PARTIC_PROJECTS ".

    Some queries can be run when you run your application, if your query is syntactically correct, you can save your query without validation (see options below the source of the query).

    The code looks OK, but I do not see to save options as the error code is mentioned.

    No one knows how to fix this?

    Thank you

    JaReg wrote:

    I finally found the problem.

    I looked at the code for the view and changed the start of:

    CREATE OR REPLACE FORCE EDITIONABLE VIEW "SCHEMANAME." "" VIEW_MEMBER_PARTIC_PROJECTS "("Participant","Projects")

    AS

    TO

    CREATE OR REPLACE VIEW "SCHEMANAME." "" VIEW_REPEAT_PARATIC ".

    AS

    And that seemed to fix it. I'm not entirely sure why though.

    The view was created using the quoted identifiers for column names. This makes them sensitive and means that they must always be referenced using double quotes. In the absence of quotation marks, Oracle is not case insensitive and automatically converts all uppercase identifiers. The application of graph:

    Select the link null, label projects, value1 "SCHEMANAME Participant." "" VIEW_MEMBER_PARTIC_PROJECTS ".

    has therefore been interpreted by Oracle:

    SELECT THE LINK NULL, LABEL, VALUE1 "SCHEMANAME PARTICIPANT PROJECTS." "" VIEW_MEMBER_PARTIC_PROJECTS ".

    and PROJECTS and PARTICIPANT columns were not recognized because the columns defined for the view have been 'Participant' and 'projects '. The graphic request should have been:

    Select the link null, the label of "Projects", "Participant" value1 "SCHEMANAME." "" VIEW_MEMBER_PARTIC_PROJECTS ".

    As you have now discovered, quoted identifiers are a source of nothing but obscure bugs and should never be used for database objects. He also pointed out the reason why you should always use a standardized, form tiny, coding style as it is faster to type, easy to read and less prone to errors.

  • ORA-00604: an error has occurred at the SQL level 1 recursive

    Hi all

    I made the full database expdp and impdp Production to test the server its success but during the creation of any user or change password its me poster below error

    SQL > create user identified by bam bam
    2 default tablespace users
    3 tablespace temporary temp
    4 unlimited quota on users;
    create user bam identified by bam
    *
    ERROR on line 1:
    ORA-00604: an error has occurred at the SQL level 1 recursive
    ORA-06502: PL/SQL: digital or value error: character string buffer too small
    ORA-06512: at line 7


    SQL > alter user identified by 12345; system
    change the system of the user identified by 12345
    *
    ERROR on line 1:
    ORA-00604: an error has occurred at the SQL level 1 recursive
    ORA-06502: PL/SQL: digital or value error: character string buffer too small
    ORA-06512: at line 7

    kindly help me to solve this problem.

    Thank you.

    One last thing. 100% make sure error is defined as partners on the issue of Test database:

    change the system '_system_trig_enabled' = FALSE;

    And then try to create/modify the user. For example:

    SQL> create or replace
      2    trigger ORA_06502
      3      after alter
      4      on database
      5      declare
      6          v_str1 varchar2(1);
      7          v_str2 varchar2(3);
      8      begin
      9          v_str2 := 'ABC';
     10          v_str1 := v_str2;
     11  end;
     12  /
    
    Trigger created.
    
    SQL> alter user u1 identified by u1
      2  /
    alter user u1 identified by u1
    *
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at line 6
    
    SQL> alter system set "_system_trig_enabled"=FALSE;
    
    System altered.
    
    SQL> alter user u1 identified by u1
      2  /
    
    User altered.
    
    SQL> 
    

    SY.

  • Error of suspicion of PL/SQL No copy of the compiler

    Hello

    My Version database is Oracle 9i.

    I have a table1 like this:
    agency_form_id      pk
    User_id  
    agency_Email_id
    date
    user_name
    I've written a procedure for agency_email_id during extraction:
    CREATE OR REPLACE
    PROCEDURE retrieve_emailid { p_formid IN table1.agency_form_id %TYPE, p_emailid OUT table1.agency_Email_id%TYPE)
                                          IS
    BEGIN
       SELECT agency_Email_id
         INTO p_emailid
         FROM table1
        WHERE agency_form_id=p_formid;
    END retrieve_emailid;
    I get an error like this:
     PLW-07203: parameter 'P_EMAILID' may benefit from use of the NOCOPY compiler hint
    Can someone help me in this please

    Thank you

    "PLW" indicates a warning, not an error.

    IIRC, Developer SQL has warnings from the compiler enabled by default, and it tends to pop when he sees an OUT or IN OUT parameter of any kind. It is doubtful that you would actually get a measurable performance of NOCOPY here advantage.

  • Get the error ORA-31204: DBMS_LDAP: PL/SQL - Session of LDAP invalid.

    I get error report error: ORA-31204: DBMS_LDAP: PL/SQL - Session of LDAP invalid. When you attempt to select a view in the APEX. The view is the source of the region for a regional report.

    The view contains data from active directory that has been built using the DBMS_LDAP package.

    PLEASE SEE BELOW FOR THE CODE USED IN THE CONSTRUCTION OF THE VIEW;

    VIEW to CREATE or REPLACE v_capa_security AS
    (select attribute_name, attribute_value)
    table (ldapquery (sys_context ('CAPA_ACCESS', 'domain') |'. com',))
    '389',
    sys_context ('CAPA_ACCESS', 'username') | » @'|| sys_context ('CAPA_ACCESS', 'domain') |'. com',.
    sys_context ('CAPA_ACCESS', 'password'),
    "DC is psdev, DC = com",
    "sAMAccountName =' | ' sys_context ('CAPA_ACCESS', 'username'),
    (("memberof, business, mail, sAMAccountName"))
    );

    (The below function retrieves data from a LDAP directory)

    CREATE OR REPLACE FUNCTION LDAPQuery)
    p_host IN VARCHAR2,
    p_port IN VARCHAR2,
    p_user IN VARCHAR2,
    p_password IN VARCHAR2,
    p_dn_base IN VARCHAR2,
    p_filter IN VARCHAR2,
    p_attributes IN VARCHAR2)
    Tbl_ty_ldap_query RETURN PIPELINED IS


    v_result tbl_ty_ldap_query: = tbl_ty_ldap_query)
    ty_ldap_query (NULL,
    NULL,
    NULL));


    retval PLS_INTEGER;
    v_session DBMS_LDAP. SESSION;
    v_attrs DBMS_LDAP.string_collection;
    v_message DBMS_LDAP. MESSAGE;
    v_entry DBMS_LDAP. MESSAGE;
    v_dn VARCHAR2 (256);
    v_attr_name VARCHAR2 (256);
    v_ber_elmt DBMS_LDAP.ber_element;
    v_vals DBMS_LDAP. STRING_COLLECTION;
    b_first BOOLEAN: = TRUE;
    v_dn_identifier VARCHAR2 (200);
    v_attributes apex_application_global.vc_arr2;

    BEGIN
    retval: = - 1;
    DBMS_LDAP.use_exception: = TRUE;
    v_session: = DBMS_LDAP.init (p_host, p_port);
    retval: = DBMS_LDAP.simple_bind_s (v_session,
    p_user,
    p_password);

    v_attributes: = apex_util.string_to_table (p_attributes, ',');
    because me in (v_attributes.first)... loop (v_attributes.last)
    v_attrs (i): = v_attributes (i);
    end loop;

    value: =.
    DBMS_LDAP. SEARCH_S (v_session,
    p_dn_base,
    DBMS_LDAP. SCOPE_SUBTREE,
    p_filter,
    v_attrs,
    0,
    v_message
    );
    retval: = DBMS_LDAP. COUNT_ENTRIES (v_session, v_message);
    v_entry: = DBMS_LDAP. FIRST_ENTRY (v_session, v_message);
    WHILE v_entry IS NOT NULL LOOP
    v_attr_name: = DBMS_LDAP. FIRST_ATTRIBUTE (v_session,
    v_entry,
    v_ber_elmt);

    WHILE v_attr_name IS NOT NULL LOOP
    v_vals: = DBMS_LDAP. GET_VALUES (v_session,
    v_entry,
    v_attr_name);

    IF v_vals.count > 0 THEN
    BECAUSE me IN v_vals. FIRST... v_vals. LAST LOOP
    v_dn_identifier: = DBMS_LDAP. GET_DN (v_session,
    v_entry);
    line of conduct (ty_ldap_query (v_dn_identifier,
    v_attr_name,
    v_vals (i)));
    END LOOP;
    END IF;
    v_attr_name: =.
    DBMS_LDAP. NEXT_ATTRIBUTE (v_session,
    v_entry,
    v_ber_elmt);
    END LOOP;
    v_entry: = DBMS_LDAP. NEXT_ENTRY (v_session,
    v_entry);

    END LOOP;
    retval: = DBMS_LDAP.unbind_s (v_session);
    RETURN;

    END LDAPQuery;



    I then use the following pl/sql code piece to fill the frame and the view;

    Start
    pkg_capa_security.pr_set_context (< username > < password >, < domain >).
    end;


    If I run the code through TOAD or SQLPLUS it works very well (I am able to select the view without getting errors)

    Is the error due to the LDAPQuery as a function of Pipelined?

    Any help/suggestions welcome.

    Thanks in advance

    If you set a process of loading page on preparing for the session of database to view your page. If you need it for the session of data used for the application that manages the POST (presentation) of your page you must set an after - submit processes. An easier way to do both is to code once in the VPD (under Security) attribute for the application.

    Scott

  • Error in windows after Microsoft sql server desktop engine has been ininstalled

    I uninstalled microsoft sql server 2000 desktop engine after I installed sql server 2005 and now when windows ends and goes to the home screen I get errors on these files sqlevn70. RLL, opends60. DLL, atxcore. DLL, sqlmangr.exe could not initialize the property (0xc0000142)

    My system info Advanced says on May 5, the Description of the Source (service control manager) (timeout (3 000 milliseconds) waiting for service MSSQL$ MICROSOFTSMLBIZ to connect.) Service MSSQL$ MICROSOFTSMLBIZ didn't start or control request in a timely.
    Then the CD-ROM driver has detected an error in the controller on \device\cdrom0. Then he repeated the process again and again until the app.management is completed with the following error. The specific module could not be found. Microsoft Antimalware has encountered an error trying to update signatures. New Signature Version: Previous Version of Signature: 1.149.1260.0 updated Source: Microsoft Update Server Update step: Source path of research: http://www.microsoft.com S ignature Type: service MSSQL$ MICROSOFTSMLBIZ could not start due to the following error: service has failed to demand launch or control in a timely.  Type of update: full user: NT AUTHORITY\SYSTEM current engine Version: previous engine Version: 1.1.9402.0 error code: error 0x8024402c description: an unexpected problem occurred when checking for updates. For more information on installing and troubleshooting updates, see Help and Support.Timeout (30000 milliseconds) waiting for service MSSQL$ MICROSOFTSMLBIZ to connect. Service MSSQL$ MICROSOFTSMLBIZ could not start due to the following error: the service did not demand launch or control in a timely.

    Hello

    I suggest you to ask your question on the TechNet Forums.

    http://social.technet.Microsoft.com/forums/en-us/category/SQLServer

    I hope this helps.

  • error code 59 installation Microsoft SQL Server 2005 xpress edition service pack 4-2463332 KB

    Moose title: error code Kb2463332 59

    When installing updated Ms SQL Server 2005 Rxpress editing service pack 4 (KB2463332) get D59 error code.

    Hello

    I suggest to try to download the update from the link below and then try to install manually and check if it helps:

    http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=b953e84f-9307-405e-bceb-47bd345baece

    For more information, see this link:

    http://support.Microsoft.com/kb/822798

    It will be useful.

  • Error during installation of MS SQL Server Express Edition (2005) on my Windows 7 Home premium

    Dear support team,

    I'm trying to install MS SQL Server Express Edition (2005) on my Windows 7 Home premium... but give the error message "this machine doesn't have a product which corresponds to this installation package."

    How can I solve this problem

    Please email it to me at * address email is removed from the privacy *

    Kind regards

    Karim Hussain

    Hi karim Hussain,.

    You can post the question on the link given below for assistance.
    http://social.msdn.Microsoft.com/forums/en-us/category/SQLServer

    You can also consult the following link:

    http://TechNet.Microsoft.com/en-us/library/ms143506%28SQL.90%29.aspx

  • What is the reason for the error. weblogic.application.ModuleException: java.sql.SQLException: ORA-28001: the password has expired

    Mr President

    Make me a mistake for an adf application.

    Running application ElizaSoft on IntegratedWebLogicServer...] 
    [06:38:05 PM] Web Module ViewControllerWebApp.war recognized in project ViewController.jpr
    [06:38:07 PM] ----  Deployment started.  ----
    [06:38:07 PM] Target platform is  (Weblogic 12.x).
    [06:38:10 PM] Retrieving existing application information
    [06:38:11 PM] Running dependency analysis...
    [06:38:11 PM] Deploying 2 profiles...
    [06:38:20 PM] Wrote Web Application Module to C:\Users\TANVIR\AppData\Roaming\JDeveloper\system12.2.1.0.42.151011.0031\o.j2ee\drs\ElizaSoft\ViewControllerWebApp.war
    [06:38:22 PM] Wrote Enterprise Application Module to C:\Users\TANVIR\AppData\Roaming\JDeveloper\system12.2.1.0.42.151011.0031\o.j2ee\drs\ElizaSoft
    [06:38:23 PM] Deploying 3 data source(s) to the server...
    [06:38:24 PM] Deploying Application...
    <Jan 3, 2016 6:38:35 PM PKT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID "2192494870412" for task "0" on [partition-name: DOMAIN]. Error is: "weblogic.application.ModuleException: java.sql.SQLException: ORA-28001: the password has expired
    "
    weblogic.application.ModuleException: java.sql.SQLException: ORA-28001: the password has expired
    
    
      at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:402)
      at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
      at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:196)
      at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:191)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
      Truncated. see log file for complete stacktrace
    Caused By: java.sql.SQLException: ORA-28001: the password has expired
    
    
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:466)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:391)
      at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:1126)
      at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:507)
      Truncated. see log file for complete stacktrace
    > 
    <Jan 3, 2016 6:38:36 PM PKT> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application "ElizaSoft".> 
    <Jan 3, 2016 6:38:36 PM PKT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.application.ModuleException: java.sql.SQLException: ORA-28001: the password has expired
    
    
      at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:402)
      at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
      at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:196)
      at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:191)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
      Truncated. see log file for complete stacktrace
    Caused By: java.sql.SQLException: ORA-28001: the password has expired
    
    
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:466)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:391)
      at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:1126)
      at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:507)
      Truncated. see log file for complete stacktrace
    > 
    [06:38:36 PM] Deployment cancelled.
    [06:38:37 PM] ----  Deployment incomplete  ----.
    [06:38:37 PM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)
    #### Cannot run application ElizaSoft due to error deploying to IntegratedWebLogicServer.
    [06:38:37 PM] Cancel requested
    [Application ElizaSoft stopped and undeployed from IntegratedWebLogicServer]
    
    

    But I got back to the top of the same request for the same user and password but it works and do not give the error.

    Help, please.

    Concerning

    Mr President

    I just want to remove the old conn ide and create a new ide conn and add to the application and it works

    Concerning

  • Error when using native dynamic SQL

    Please can someone help me understand what's wrong with my code.

    Code:

    create or replace procedure p1 (name varchar2)

    as

    Start

    run immediately "select * from ' |" name;

    end;

    /

    Goal: Just to test the native dynamic SQL code using a placeholder.

    COmpliation:

    SQL > create or replace procedure p1 (name varchar2)

    2 as

    3

    4 start

    5 run immediately "select * from ' |" name;

    6 end;

    7.

    Created procedure.

    Error:

    SQL > exec p1 ('employees');

    BEGIN p1 ('employees'); END;

    *

    ERROR on line 1:

    ORA-00923: THE KEYWORD not found where expected

    ORA-06512: at "HR. "P1", line 5

    ORA-06512: at line 1

    SQL >

    You need a space after the clause 'from', like this:

    run immediately "select * from ' |" name;

  • -You also get an invalid identifier error when executing this query sql for a data model, but not in TOAD/SQL Developer?

    Hello OTN.

    I don't understand why my sql query will pass by in the data model of the BI Publisher. I created a new data model, chose the data source and type of Standard SQL = SQL. I tried several databases and all the same error in BI Publisher, but the application works well in TOAD / SQL Developer. So, I think it might be something with my case so I'm tender hand to you to try and let me know if you get the same result as me.

    The query is:

    SELECT to_char (to_date ('15-' |)) TO_CHAR(:P_MONTH) | » -'|| (To_char(:P_YEAR), "YYYY-DD-MONTH") - 90, "YYYYMM") as yrmth FROM DUAL


    Values of the variable:

    : P_MONTH = APRIL

    : P_YEAR = 2015

    I tried multiple variations and not had much luck. Here are the other options I've tried:

    WITH DATES AS

    (

    Select TO_NUMBER (decode (: P_MONTH, 'JANUARY', '01',))

    'FEBRUARY', '02',.

    'MARCH', '03'.

    'APRIL', '04'

    'MAY', '05'.

    'JUNE', '06'.

    'JULY', '07',.

    'AUGUST', '08'.

    'SEPTEMBER', '09'.

    'OCTOBER', '10',.

    'NOVEMBER', '11'.

    "DECEMBER", "12."

    '01')) as mth_nbr

    of the double

    )

    SELECT to_char (to_date ('15-' |)) MTH_NBR | » -'|| (TO_CHAR(:P_YEAR), 'DD-MM-YYYY') - 90, "YYYYMM")

    OF DATES

    SELECT to_char (to_date ('15-' |: P_MONTH |)) » -'|| ((: P_YEAR, 'MONTH-DD-YYYY')-90, "YYYYMM") as yrmth FROM DUAL

    I'm running out of ideas and I don't know why it does not work. If anyone has any suggestions or ideas, please let me know. I always mark answers correct and useful in my thread and I appreciate all your help.

    Best regards

    -Konrad

    So I thought to it. It seems that there is a bug/lag between the guest screen that appears when you enter SQL in the data model and parameter values, to at model/value data.

    Here's how I solved my problem.

    I have created a new data model and first created all my settings required in the data model (including the default values without quotes, i.e. APRIL instead "Of APRIL") and then saved.

    Then I stuck my sql query in the data model and when I clicked ok, I entered my string values in the message box with single quotes (i.e. "in APRIL' instead of APRIL)

    After entering the values of string with single quotes in the dialog box, I was able to retrieve the columns in the data model and save.

    In the data tab, is no longer, I had to enter the values in single quotes, but entered values normally instead, and the code worked.

    It seems the box prompted to bind the values of the variables when the SQL text in a data model expects strings to be wrapped in single quotes, but no where else. It's a big headache for me, but I'm glad that I solved it, and I hope this can be of help to other institutions.

    See you soon.

  • No error data based on pl/sql package

    I have the following code in a function that is part of a package.  The code gives me an error No_Data operating in function even if it should return a data value.  I can run the select SQL Plus and it works very well and returns the correct data, but using a function gives me this error.  Please help.

    FUNCTION get_dept_poc_rid

    (in_company NUMBER,

    in_dept VARCHAR,

    in_process_lvl VARCHAR)

    RETURN NUMBER IS

    return_value NUMBER;

    BEGIN

    ID_MANAGE_ID of SELECT INTO return_value OF ID_MASTER WHERE EMPLOYEE =)

    SELECT CASE - Choose employee ID based on which field master dept is not null

    WHEN dm. TIMEKEEPER <>0

    THEN dm. TIMEKEEPER

    WHEN dm. DIRECTOR <>0

    THEN dm. DIRECTOR

    WHEN dm. CHAIR <>0

    THEN dm. CHAIR

    0 OTHERWISE

    END dept_contact_employee_id - deal for the employee id

    OF deptmast dm

    deptcode dc

    WHERE TRIM (dc.department) = TRIM (dm.deptcode1)

    AND dc.process_level = dm.process_level

    AND dc.company = dm.company

    AND dc.active_flag = 'A '.

    AND dc.company = in_company

    AND deptcode1 = in_dept

    AND dc.process_level = in_process_lvl

    );

    RETURN Return_value;

    END get_dept_poc_rid;

    Hi everyone, I think I found it.  Apparently the length of variables and fields must match.  So I had to cut the Varchar table fields to match the literals from the variable.  It may even be advisable to cut both sides of the equation?  I'm kind new to Oracle but it's 101 PL/SQL, I'm sure.  I should have better.  Thanks to all the help that you so much he made me thinking in the right direction after spinning my wheels for a while.  Sometimes you just need to bounce back such things on people.  Thanks again.

  • Error loading built-in PL/SQL Gateway for Application Express (APEX)

    After problems try to load tried listener of the APEX (on my computer at home, for personal development and learning), I switched direction by the answer and my first question tries to install APEX to simply go with the loading of the PL/SQL gateway shipped.


    My Oracle 11 g d.b. works very well, and I from what I can tell APEX I successfully installed.


    Then I came across an error during the stage n 3.4.4.1 "Runs the Script of apex_epg_config.sql Configuration", which is @apex_epg_config.sql SYSTEM_DRIVE:\TEMP, which I ran @apex_epg_config.sql e:/app/apex/temp, here:

    epg_install_error.PNG







    WM Peck 1958 wrote:

    After problems try to load tried listener of the APEX (on my computer at home, for personal development and learning), I switched direction by the answer and my first question tries to install APEX to simply go with the loading of the PL/SQL gateway shipped.

    My Oracle 11 g d.b. works very well, and I from what I can tell APEX I successfully installed.

    Then I came across an error during the stage n 3.4.4.1 "Runs the Script of apex_epg_config.sql Configuration", which is @apex_epg_config.sql SYSTEM_DRIVE:\TEMP, which I ran @apex_epg_config.sql e:/app/apex/Temp

    It should be: @apex_epg_config.sql e:/app

    The "base directory" refers to the directory containing the files unzipped apex.

Maybe you are looking for