I am providing the complete code and my exact requirement.
CREATE OR REPLACE PACKAGE INTERNAL_SCORING_RAM
IS
PROCEDURE TrendScoring_ram(pBUID IN STAGING_ORDER_DATA.BUID%TYPE,
OrderNum IN STAGING_ORDER_DATA.ORDER_NUM%TYPE,
ReturnValue OUT VARCHAR2);
[code]...
/In my code the procedure "trendscoring_ram" is calling "inserttrend_ram" procedure 70 times for different variable values. Instead of calling the "inserttrend_ram" procedure 70 times.
want to hold the values in a associative array , defining it in package and call that procedure only once.As below.
create or replace function nothin return int as type arr_type is table of departments.department_id%type index by binary_integer; arr arr_type; begin select department_id into arr from departments; return 4; end;
It gives the error : Quote:expression 'ARR' in the INTO list is of wrong type I can't figure out why.
For Nested table i have done it in follwing way? This is pl/sql stored procedure.
CREATE or REPLACE PROCEDURE TEST( activationStartDate IN DATE, activationEndDate IN DATE,
[Code]....
My JavaCode is
--First getConnection --prepare sql string : sql = "{ Call Test(?,?,?,?,?) } "; --Use prepareCall function on Connection object and passed this sql string and retrived CallableStatement class object.
[Code].....
Then what if i want to select more than one column from EMPLOYEE and pass to my javaCode......How my Pl/Sql will look like?........ I know how to retrieve all the coloumns of resultset in java.
I want to ask how pl/sql code will look like, i know the retrieveal process in java.
List<List> result = new ArrayList()<List>; List col = new ArrayList(); ResultSet rs = (ResultSet)stmt.getObject(5); ResultSetMetaData rsMetaData = rs.getMetaData();
I've one package in which one record is created. associative array is craeted on that record.create procedure on associative array.using forms 6i i want to call this procedue.(package_name.procedure_name(paramerters)). but my problem is what paramerter shuld i provide to excute the procedure?like PK_EXCEL_TO_DB.PR_DO_INSERT(LIST_ROUTE); but i am getting error while doing this.
CREATE OR REPLACE PACKAGE PK_EXCEL_TO_DB IS TYPE ROUTE IS RECORD (COL_ROUTE VARCHAR2(255), VAL_ROUTE VARCHAR2(4000)); TYPE LIST_ROUTE IS TABLE OF ROUTE; PROCEDURE PR_DO_INSERT(i_lData IN LIST_ROUTE);
APEX_ITEM functions do not seem to be working correctly. When I create a region with this query:
select APEX_ITEM.SELECT_LIST_FROM_QUERY(1, 1, 'select ''Jan'' d, 1 r from dual union select ''Feb'' d, 2 r from dual') month_id
from dual I get the error:report error:ORA-06502: PL/SQL: numeric or value error: associative array shape is not consistent with session parametersWhen I run that query in SQL Developer I get this:
which is correct.I tried changing NLS_COMP parameter from Linguistic to Binary and changing NLS_SORT to BINARY_CI but that did not make a difference. This seems like a rare problem and generally related to installation but it has me stopped dead in my tracks.
I was making some page validation to APEX_ITEM manual tabular form. When every a validation executes it will clear all the data what user enters. What is the best method to hold the session values in APEX_ITEM.
How to create this pl/sql process to add elements to a nested table or varray within a loop. Here's the scenario: I have an apex package that has some pl/sql processes and some stored procedures. I am dealing with Inspection Areas. An Inspection Area has several sectors. I already have the loop that lists all the Inspection Areas and a loop inside that loop that lists all the sectors. There is an if statement that determines whether or not the sector name gets stored in the varray or table. I am not sure how to correctly do this and am not sure whether to use a nested table or varray. I've posted somewhat of a pseudo coded example below
If (you_belong_in_table) then variable := store_me_in_varray /* OR */ variable := array_type(sector.sector_name) i := i + 1; end if;
/* Now we output our varray or table */ start loop output(sector names one by one)
end loop I hope this makes sense. I more so just need the syntax to be able to continually added values to a table or varray while I'm already inside a loop; and also how to output those values end the end as well.
But if I put l_my_arr(l_year) := 0, immediately after FETCH, then the counter is always 1, and I cannot put it before because l_year has to be FETCHED.
Basically, we have 2 procedures in 2 different databases. One of them makes a call to the other over a database link passing an associative array as a parameters.
This has woked fine for many years 9.2.0.8.0 but we are in the process of migrating to 11.2.0.2.0 and have started getting compilation errors.
1 > Create TYPE in Database_1 ===================== CREATE OR REPLACE PACKAGE DB1_Pkg IS type x_tab is table of number index by binary_integer; v_tab x_tab; END DB1_Pkg;
I wanted to practice dataguard in oracle. I feel that I can practice realistically if I have 2 different servers to do switchovers, building new physical standby database from scratch and shipping the archiving logs from primary to physical standby database, etc., Can I use VMWare software to install 2 different servers and then practice dataguard?
I have error message when running duplicate : FRM-21011: PL/SQL unhandled exception ORA-06502..I'm trying to hold 4000 characters in a variable like what do below:
if s_str is NULL then s_str := eachcol.column_name||'{{'|| name_in(name_in('system.cursor_block')||'.'||eachcol.column_name)||'{{'; else s_str := s_str||eachcol.column_name||'{{'|| name_in(name_in('system.cursor_block')||'.'||eachcol.column_name)||'{{'; end if;
It's simple variable to hold value but still can't get by large string though.
I wanted to practice dataguard in oracle. I feel that I can practice realistically if I have 2 different servers to do switch overs, building new physical standby database from scratch and shipping the archiving logs from primary to physical standby database, etc.,
Can I use VMWare software to install 2 different servers and then practice dataguard?
In current form, i use *pll file to pass Global.<variable name> to the form *.fmb
The problem is that if i copy a string of 4000 characters (which i need to) to Global.<variable name>, it will automatically cut a whole chunk to shorter string (less than 1000).
Is there a better way to that Global.<variable name> can hold 4000 characters?
Is it possible to hold the data from select statement without temp table or materialized view or view in oracle?
because my DBA does not give access to create temp table.but we are selecting the records from 3 different sql statement.
Example: inserting in temp table
a) insert into temp select empno,ename,sal from emp where sal>4000 b) insert into temp select empno,ename,sal from emp where dept=40 c) insert into temp select empno,ename,sal from emp where comm is null
why we seem to be unable to report against the ap invoice hold release date using Discoverer in Oracle 11.5.10? the person who wrote our current report used a decode statement to look at the last update date of the release lookup code to create a release date, but i am trying to recreate this in a different tool (Qlikview) and just wanted to understand why we seem to be unable to report on the field as is!
I try the solution and it works fine but I lost tree functionality that saves tree state (Selected Nod Page Item), value of this item is correct but async operation reset tree state.
I have a tmp table with 6 cols, and data to be inserted is from two other tables. My problem is there the cols of the table are
sid varchar2(10), cob_dt varchar2(10), deal_id varchar2(10), new_val varchar2(10), old_val varchar2(30), amend_col v archar2(50), i have return a proc create or replace
oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production PL/SQL Release 11.1.0.6.0 - Production "CORE 11.1.0.6.0 Production"
I have this in one of the packages WCL_LIB: TYPE vc2_255_arr IS TABLE OF VARCHAR2(4000) INDEX BY BINARY_INTEGER;
and i use it in one of the procedures as PROCEDURE "WCL_EVENTS" (p_event_id IN NUMBER, p_event_arr IN Wcl_Lib.vc2_255_arr, p_model IN VARCHAR2 DEFAULT NULL, p_model_code IN VARCHAR2 DEFAULT NULL
but the calling procedure doesnt have any array.... Can I declare something like in the procedure to be called p_event_arr IN Wcl_Lib.vc2_255_arr DEFAULT NULL,
I tried, but doesnt seem to work? so how to call the procedure, which has a array as mandatory, but calling one doesnt have any?
I'm having some hard times with attempts to initialize a set of values, Of a specific column from a table into a variable containing it as an array(like a single column table).
Then I am trying to compile a function that gets a parameter - a number. The function should check whether this number exists in this list(return 1), or not(return 0).
I want to initialize key1 column of table TEST_TAB *into* v_my_array(this will be my list), just to see that I can have a set of values in this variable. Then I will want to see if the number is in that list, and return 1 or 0 accordingly.
I get the following error compiling, and can't seem to understand what's wrong:
SQL> create or replace function is_num_in_list (p_number number) 2 return number 3 is 4 TYPE varray_type IS TABLE OF NUMBER(10) INDEX BY PLS_INTEGER; 5 v_my_array varray_type; 6 begin 7 select key1 into v_my_array from TEST_TAB; 8 --if the number provided exists in the list, then 1(TRUE) 9 if p_number in v_my_array then 10 return(1); 11 else 12 --if the number provided *IS NOT* in the list, then 0(FALSE) 13 return(0); 14 end if; 15 end; 16 /
Warning: Function created with compilation errors.
SQL> show error Errors for FUNCTION IS_NUM_IN_LIST:
LINE/COL ERROR -------- ----------------------------------------------------------------- 9/16 PLS-00103: Encountered the symbol "V_MY_ARRAY" when expecting one of the following: ( SQL>
i have a problem when i execute this query and it takes more than 32 minutes and after that connection get hanged in toad 9.2.7 and oracle version 11.2.1.0 with this error- index was outside the bounds of array.
SELECT t.ID AS "serial#", SUM (CASE WHEN (SELECT MAX (g.test_date) FROM label1 a LEFT JOIN label2 g ON g.ID = a.ID ) IS NOT NULL
[code]...
i want to know the cause of above error and what would be the solution.