i have a SQL query . In the where clause of the query , there is function called dimension_intersect which takes 2 parameters.Now , when the 2 dimensions passed intersect , the function returns "Y" and the query works as expected
Function in where clause is as below
Dimension_intersect(Dimension1,select dimension2 from product where product_sys_id=1)='Y'
The above function works fine till only 1 record is returned by the inner subquery used in above function. But when "select dimension2 from product where product_sys_id=1" return 2 dimensions then the function fails as it can accept only one dimension at a time . I am not allowed to edit this function. I need to find a way to pass both the dimensions one at a time.
I have a scenario where I have to pass a paramter to "in statement". When I run the query from SQL plus its working fine.......but when I run the query at run time it doesnot come back with the results. I am sure its formating issue.
This is how I create a paramter
_sbInStatement.Append("("); foreach (ListItem item in _listBox.Items) {
I have a procedure with 20 parameters, acutely it is to update a table and each param represents respective columns in a table. I want to update only few selected columns(random), as of now am passing Null as param values for remaining.
Is there any way to ignore the unnecessary parameters instead of passing NULL value.My Proc call looks like...
we have a table which name is empl have two column (comapnyname,jobdate) i want output after passing parameter which name is month which value is like(feb 2011,or mar 2011 or apr 2011 or jun 2011 etc) output should come the nameof company with jobdate whose jobdate is equal to 3 or greate than three
name of company,jobdate whose job date in particular month is greater than three or equal to three the purpose of this we want to find only the name of company where we visit morethan three times in particular month table structure is
insert into empl values('ABC','1-feb-2011') insert into empl values('ABC','10-feb-2011') insert into empl values('ABC','21-feb-2011') insert into empl values('xyz','18-feb-2011') insert into empl values('xyz','1-feb-2012') insert into empl values('xyz','1-apr-2011') insert into empl values('ABC','28-feb-2012')
CREATE OR REPLACE PROCEDURE GET_NUM_ROWS(TABLE_NAME VARCHAR2) AS NUM_ROWS NUMBER; BEGIN SELECT COUNT(*) INTO NUM_ROWS FROM TABLE_NAME; DBMS_OUTPUT.PUT_LINE(NUM_ROWS); END;
When I try to compile it, the compiler says:
ERROR at line 4: PL/SQL: ORA-00942: table or view does not exist.
I have a pl/sql procedure having IN, OUT and IN-OUT parameters, this procedure in called from front end application. Now I need create a script to run this procedure from back end (sql prompt) and the result must be same as the front end application call to this procedure.
For the procedure I don't want to pass IN parameter instead to pick the value from the package where the derivation is defined. how to run this procedure from sql prompt without passing value for IN parameter.
I have a table Student with two columns Rno and Name and i write following PL-Sql, it is working fine, my question is that how can i pass the parameter to cursor in the following query, e.g. if i pass the roll no. 501 then it should display only the particular Name.
declare ��� cursor st_name is ����������� select rno,name from student; ����������� studentnm st_name%ROWTYPE; begin �� open st_name;
i have a table empl which have three column (name,period,attendance)if we pass parameter which value is based on period column
like :January
then out should come sum of all attendence of january group by name like that
name attendance a60.00 b20.00 c20.00 w40.00
if we pass parameter value :February then attendance should come sum of (January and February) and if we pass parameter March then attendance should come sum of(January,February and march)
create table empl (name varchar2(10),period varchar2(10),attendance number) insert into empl values('a','January',20) insert into empl values('a','January',10) insert into empl values('a','January',30) insert into empl values('a','February',20) insert into empl values('a','March',60) insert into empl values('b','January',20) insert into empl values('c','January',20) insert into empl values('w','January',40)
I have a stored proc which takes IN parameter of datatype varchar2.When I am trying to run the proc it is throwing error that "input buffer too small".The datatype assigned to IN parameter is of varchar2(200) but actually the length of the parameter passed is around 500 characters.the way to increase the length of Input parameter to 500 characters??
create or replace procedure procedure_name(p_like VARCHAR2) is cursor cursor_name is select last_name from employees where UPPER(last_name) like '%p_like%'; emp_rec cursor_name%rowtype; begin open cursor_name; [code]....
how do I pass the values that i get in the cursor to a select statement. If table1 values are 1,2,3,4 etc , each time the cursor goes through , I will get one value in the variable - OfferSo I want to pass that value to the select statement...the one below does not work.
drop table L1; create table L1 (col1 varchar(300) null) ; insert into L1 (col1) select filter_name from table1 ; [code]....
How to pass a values from one to another, but without using parameters or globals. I've used parameters and every time i have to list the values of the form that values have been passed to, it ask do you want to save... even if I didn't passed any values. It's because my code in where-new-form instance, where i give values to a parameters.
can we pass parameter in a link. i.e when we open a new form clicking on the link, some values to be passed to the form so that new form get populated with that value.
I had created drill down reports. rep_1 dispalying various Location_cd. by clicking location_cd The parameter form of rep_2 is displayed in which location_cd is displayed which is already selected and accept dept_cd from user. While running the rep_2 the parameter location_cd is passing null value.
I have a requirement where in I have to store large data in one of the database columns using stored procedure.
I have declared the column as CLOB as it can store upto 4GB and also the input parameter for the procedure as CLOB. But when I am trying to pass large data it is not allowing to store as it is throwing literal string too large error.
Is there any restriction in the data size to be passed to the stored procedure?
CREATE OR REPLACE FUNCTION fn ( p_salesrep_id IN jtf_rs_salesreps.salesrep_id%TYPE, p_org_id IN jtf_rs_salesreps.org_id%TYPE, p_cnf_date IN emcint_ord_headers_all.creation_date%TYPE
[Code]....
Invoking Functions
select fn(-3,293,'1/1/1952'), resource_id from jtf_rs_salesreps where rownum < 5 ORA-06552: PL/SQL: Statement ignored ORA-06553: PLS-382: expression is of wrong type
create or replace procedure bank_search_sp ( p_tablename in varchar2, p_searchname in varchar2, p_bankcode out varchar2, p_bankname out varchar2, p_dist_code out number ) as v_tem varchar2(5000); begin v_tem :='select bankcode,bankname,dist_code from ' || UPPER (p_tablename) || ' where bankname like '''|| p_searchname||''; execute immediate v_tem into p_bankcode,p_bankname,p_dist_code using p_searchname ; commit; end bank_search_sp;
the Procedure is getting created but i dont know what actually happens when it was executed ,This is the error shown..ORA-01756: quoted string not properly terminated
ORA-06512: at "PENSIONS.BANK_SEARCH_SP", line 14 ORA-06512: at line 1
I prepared a report in Oracle reports and trying to run the report through command line by creating a batch file. but i am getting the following error message when i run the batch file
REP-0069: Internal error REP-57054: In-process job terminated:Executed successfully but there were some errors when distribute the output REP-50159: Executed successfully but there were some errors when distribute the output
I have developed a report using apex shared components (report query and report layout) along with BI Publisher for report printing in pdf format. the Report template is built using Template Builder for Word. I have configured my Apex4.1 env with BI Publisher 11. This report is working fine for hardecode ID ( like REQUEST_ID=10 ). to make report dynamic i have made following additions in the report
I have added where clause in report query as WHERE REQUEST_ID = :REQUEST_ID (:REQUEST_ID is the text field in my page).
Added a text field names :REQUEST_ID to get user input at run time.
Create a button and add Repot Query URL in its properties. When i run the report with some valid value in :REQUEST_ID text field i did not get expected result infect there is no record getting displayed in the PDF file. i think this is not the write way to do this but interestingly im not getting any error. how can i get this functionality in apex this way or the other ?
How I could pass list of arguments passed to a pl/sql block in a generic way without knowing their names in advance? I mean that in machine languages you could just get the stack dumped. In PERL you would access @_.In Oracle I could use AWR to extract values bound to a query using system views but what about PL/SQL code?
Let say that I have abstract method:
create package p is procedure p(...) is begin <<here I'd like to dump all the arguments passed to my procedure without knowing what "..." is>> end p; end p;
Now from Pro*C function I want to pass a similar array of structure to this procedure and return it via the out parameter of the procedure back to Pro*C. How do I do it?
I am using the attached program but its giving me compiler error as follows..
Error at line 31, column 1 in file sample.pc proc_modify_tdefs (:in_tdefs,:out_tdefs); 1 PLS-S-00306, wrong number or types of arguments in call to 'PROC_MODIFY_TDEFS' Error at line 31, column 1 in file sample.pc proc_modify_tdefs (:in_tdefs,:out_tdefs);
I have created the below types and oracle objects.
create or replace type T_EMA_NP_SETDEL_RESP_REC as object ( respCode number, respDesc varchar2(255) )
create or replace type T_EMA_NP_RANGE_LNPTICKET_TAB AS TABLE OF T_EMA_NP_RANGE_LNPTICKET_REC create or replace type T_RANGE_TICKET_TAB AS TABLE OF T_RANGE_TICKET_REC
The following types are created in the Package specification
type t_resp_rec IS RECORD ( resp_code number, resp_desc varchar2(255) ); -- subtype t_ema_lnpticket is T186_IN_REQ_PARAMETER.T186_EMA_LNPTICKET%TYPE; -- Number type t_ema_lnpticket_tab is table of t_ema_lnpticket index by binary_integer;
I have the following two procedures
PROCEDURE getEMAReturnResponse( p_in_call_request_id IN number, p_ema_resp_rec IN t_ema_np_setdel_resp_rec, p_ema_range_lnpticket_tab IN t_ema_np_range_lnpticket_tab, p_endof_event IN varchar)
PROCEDURE Return_Response(p_in_call_request_id IN number, p_ema_resp_rec IN t_ema_resp_rec, p_ema_lnpticket_tab IN t_ema_lnpticket_tab, p_endof_event IN varchar2)
getEMAReturnResponse Procedure:
Accessed by Java application to pass the values. Should call the Return_Response procedure and pass the values received from Java.
Return_Response Procedure
The p_ema_lnpticket_tab is a sort of array that can have multiple values. Please see the example of values. Has all the business rules and validation that should be adhered.
Example of Vaules p_in_call_request_id = 1 p_ema_resp_rec = 12345, 'Operation Failed' p_ema_lnpticket_tab = (1,2,4,5) p_endof_event = Y
I have created the below types and oracle objects.
create or replace type T_SETDEL_RESP_REC as object ( respCode number, respDesc varchar2(255) ) -- create or replace type T_EMA_NP_RANGE_LNPTICKET_REC as object ( ticket number ) create or replace type T_RANGE_TICKET_TAB AS TABLE OF T_RANGE_TICKET_REC
The following type is created in the Package specification
type t_resp_rec IS RECORD ( resp_code number, resp_desc varchar2(255) );
I have the following two procedures
Procedure getResponse(p_call_request_id IN number, p_resp_rec IN t_setdel_resp_rec, p_range_ticket_tab IN t_range_icket_tab, p_endof_event IN varchar)
PROCEDURE ProcessResponse(p_call_request_id IN number, p_resp_rec IN t_resp_rec, p_ticket_tab IN t_ticket_tab, p_endof_event IN varchar2)
The get Response procedure is a wrapper procedure exposed to Java to pass values. The Process Response procedure is a main procedure where all logics and business rules are handled.
The Problem is:
How can I pass the values from get Response procedure to Process Response procedure. So that rules and validations are applied. Please note the p_ticket_tab may have many ticket numbers corresponding to p_call_request_id.
create function xxx_sal (p_number in number) return number is v_sal number; begin select sum(sal) into v_sal from emp where empno = p_number; return v_sal; end;
creating a text index using the section group parameter? The problem that I am having is when I create my text index and perform a query using Score, I do not get the correct results back.
select score(1) from mybaby where contains(name,'Mommy',1)>0;