Forms :: Passing Data From One Procedure To Another?

Apr 18, 2013

How to pass data of one procedure to another procedure in oracle forms.

View 1 Replies


ADVERTISEMENT

Stored Procedure For Searching Data From A Table By Passing Tablename As A Parameter

Feb 6, 2012

This procedure is not working properly.

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

View 1 Replies View Related

SQL & PL/SQL :: Passing DATE To Procedure?

Dec 10, 2010

I have a procedure that accepts a date as an input parameter. This parameter is used in a select statement to match on a table column of date type.

1) Should the parameter be declared and passed in as a varchar2 and then converted using to_date() or declared as a date type? If it's declared as a date type what format should it be passed in as, ie. '01-MAY-2010' or '01-MAY-10' or etc.

2) When I run the sql query, knowing data exist, like "WHERE test_date = '22-NOV-10'" I get no results so I know I'm not matching the date correctly but if I use "WHERE test_date LIKE '22-NOV-10%'" I get the correct results. Trying to build a variable to match this, and use in a cursor, consistently gives me the 'non-numeric character was found...' error

3) formatting the test_date input variable to match on the date type column.

View 21 Replies View Related

SQL & PL/SQL :: Passing Parameter In Procedure

Jan 4, 2011

I have got this procedure:

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.

View 3 Replies View Related

SQL & PL/SQL :: Run Procedure Without Passing Value For IN Parameter

Mar 10, 2012

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.

View 6 Replies View Related

Passing Sh Variable Value To Input Of PL/SQL Procedure

Aug 30, 2012

how can I pass the sh variable (.i.e file name stored in sh variable called($F)) as a input of below mention procedure (YODEL_XL_ INS_SDG_ COMMER_ PROD)

for F in *.dat; do
#
echo $F
#
#sqlldr apps/apps control=$CONTROL data=$F
# Below Part is used for Add the file name into table
[code]...

View 8 Replies View Related

SQL & PL/SQL :: Passing Input Parameter To Like Variable In Procedure

Dec 27, 2012

I have a procedure named 'GetShipperinfo' which takes i_name as input and needs to build a cursor taking i_name as input

i.e.

The following sql when executed at sqlplus prompt gives correct results.

select dept, supplier, shipper_id
from shippers
where upper(shipper_name) like upper('Frank Robert%');

How can I transform this inside a cursor within a procedure passing 'Frak Robert' value as i_name input.

i.e I should be able to call the procedure as follows

sql> variable v1 varchar2;
sql> exec pkg_shipment.GetShipperinfo('Frank Robert',:v1);
sql> print :v1;

Should the cursor inside the procedure be built as follows

cursor c1 is
select dept, supplier, shipper_id
from shippers
where shipper_name like ''||upper(i_name'%''||)'';

Iam unable to build the sql for the cursor.

View 3 Replies View Related

PL/SQL :: Procedure To Search Employee By Passing First / Middle Or Last Name

Jun 5, 2013

sort out the error of this procedure to search an employee by passing employee fname or middle or last to get his name .

CREATE OR REPLACE PROCEDURE "WEB_MASTER"."SEARCH_EMPLOYEE"
(empname IN VARCHAR2) is
cur number;
v_emp_name VARCHAR2 (100);
r number;
begin
[code]....

View 6 Replies View Related

PL/SQL :: Execute Procedure By Passing Number Array

Oct 26, 2012

Oracle 11.2.0.1
Windows

create type np_type is varray(3) of number
/

create type cn_type is varray(3) of number;
/

create type cxn_type is varray(3) of varchar2(2000)
/

I created TEST table by below pl/sql block :

declare
execstr varchar2(2000) :='create table test(';
begin
for i in 1..80 loop

[Code]....

*ERROR at line 5: ORA-06550: line 5, column 8: PLS-00103: Encountered the symbol "MYPROC1" when expecting one of the following: := . ( @ % ;

The symbol ":=" was substituted for "MYPROC1" to continue.

SQL>The above procedure will insert the supplied numbered string into the test table which split the numbered string based upon supplied splitids of sp_table.

View 7 Replies View Related

Precompilers, OCI & OCCI :: Passing Array Of Structure To Oracle Procedure And Returning Back?

Apr 29, 2010

I created a table and some type definitions in oracle 10.2.0.3 DB as follows. There is also a procedure that I defined and is shown below.

SQL> create table test_proc
(
test_name varchar2(10),
test_ver number (3,3),
active_flag number(2)
);

Table created.

SQL> select * from test_proc;
TEST_NAME TEST_VER ACTIVE_FLAG
---------- ---------- -----------
AFP 1.5 2
PSA 11.89 0
EHIV 99.5 3
aHAVM 1.45 9

[code]....

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);

[code]....

View 2 Replies View Related

Forms :: How To Create Data Block Using Stored Procedure In 10G

Apr 30, 2010

How to create Data Block Using Stored Procedure in Forms10G ?

View 1 Replies View Related

Forms :: Data Block Based On Procedure - Getting Compilation Error

Mar 13, 2013

I am trying to create a datablock based on a procedure , but im getting errors in compilation:

Errors are :
1) identifier 'HSM_WSH_DEL_UTIL.DEL_TBL' must be declared

2) PL/SQL ERROR 320 at line 7, column 27 the declaration of the type of this expression is incomplete or malformed

Heres my pkg spec and body for the data block:

CREATE OR REPLACE PACKAGE hsm_wsh_del_util
IS
TYPE del_record IS RECORD (delivery_id NUMBER);
TYPE del_tbl IS TABLE OF del_record
INDEX BY BINARY_INTEGER;

PROCEDURE do_query (p_del IN OUT del_tbl);
END hsm_wsh_del_util;
[Code] .....

View 1 Replies View Related

Passing Unstructured Data From Pro*C To PLSQL

Dec 12, 2011

My application reads a binary file in C++ using fstream.read and needs to save that binary data into the database as a blob.

I am not using OCI.

My struggle is trying to determine the proper way to pass this unstructured data to a PLSQL procedure.

1 > What data type should the input paramter be for the PLSQL procedure?

2 > My binary data is in a char variable. Do I need to convert that to something else before passing it as a parameter.

View 3 Replies View Related

SQL & PL/SQL :: Passing CLOB Data As Input Parameter?

May 24, 2010

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?

View 9 Replies View Related

Forms :: Null Value Not Passing

Oct 18, 2011

I am trying to pass null value '' in form but still failed

---SQL---
select distinct column1 from abc
Y
NULL
two records found.

---FORM---
I have a list item name user_pick which is in two values SOUND-Y, DAMAGE-'' passing null value

--BUTTON--
select count(column1) into A from abc
where column1=:user_pick;

when user pick from list SOUND it is ok..When user pick damage this will show 0 means null value are not passing correctly.i also tried in radio group,check box

View 4 Replies View Related

Forms :: Passing Parameters From One Form To Another?

Jun 1, 2009

i want to pass parameters from xyz form to abc form when i press a button. how to pass parameters.....

View 5 Replies View Related

Forms :: Passing Two Parameters Between Form A And B

Sep 17, 2010

I need to pass two parameters (STUD_ID) and (TERM) from Form A to Form B. I've read a lot but I'm not familiar with terms and oracle jargon yet! So I really need your straight forward clarification

From the Calling form I'm using when_button_pressed trigger...what shall i write in here?! In the Called form, I'm declaring the following under (When_new_form-instance):

declare
p1_id paramlist;
stud_id number(8);
term number(5);

begin

p1_id := get_parameter_list(stud_id);
p1_id := get_parameter_list(term);
:TEST_STUD_CRSE_REG.stud_id :=:parameter.stud_id;
:TEST_STUD_CRSE_REG.term :=:parameter.term;
next_block;
end;
-----------------
on the calling form:when_button_pressed I am using:

DECLARE

p1_id paramlist;
stud_id number(8);
term number(5);

BEGIN

call_FORM('test16SEP',NO_HIDE);
GO_BLOCK('TEST_STUD_CRSE_REG');
set_block_property('TEST_STUD_CRSE_REG',default_where,'STUD_ID=:TEST_STUDENT_INFO.STUD_ID');
execute_query;
END;

View 2 Replies View Related

Forms :: Dynamically Passing Where Condition

Jul 4, 2011

I am working on 6i reports.I have below scenario to achieve.

I have FIND window and MAIN Window.

FIND Window: contains EMPNO, ENAME,and FIND button.

MAIN WINDOW: EMPNO, ENAME, SAL, JOB

If i enter something in FIND window, by clicking FIND button, it will populate data in MAIN window.I have below query in WHEN BUTTON PRESSED TRIGGER.

declare
cursor c1 is select empno, ename, job, sal from emp
where empno=nvl(:FIND.empno,empno)
and ename=nvl(:FIND.ename,ename)

begin
--here i am populating data into MAIN window block
end;

It's working fine.

REQUIREMENT: i want to pass where statement dynamically. Let us say if i pass only empno in FIND window, i want to pass 'WHERE empno=:FIND.empno' to existing select statement [I will keep select statement same without where condition]

If i pass empno and ename both, i want to pass 'WHERE empno=:FIND.empno and ename=:FIND.ename.

How to pass where condition to existing select statement based on parameters we pass in FIND window.

View 8 Replies View Related

Client Tools :: Passing Variable And Displaying Select Data In TOAD?

Apr 22, 2010

All I want to do is run a procedure (DO_H_RUN) that returns a number into "v1" and then use that variable to return the result sets in three selects. This is all in TOAD. If I do not have a where clause, the code executes fine (allowing me to see the data in multiple Grid tabs)! But, I want to filter the rows.

I've tried doing a number of different things (finding all sorts of stuff on the Web) like declaring cursor variables and the like but after spinning on this for a couple of hours, I'm stuck.

Here's my attempt (the names have been changed to protect the innocent!):

declare
v1 Numeric;
BEGIN
DO_H_RUN('Me', v1);
--DBMS_OUTPUT.PUT_LINE(v1); --This line works okay!
select * from h_run where h_run_id=v1; --NO GO

[code]....

View 10 Replies View Related

PL/SQL :: How To Write Procedure To Load Data Into Table Using XML File As Input To Procedure

Sep 20, 2013

how to write procedure to load the data into a table using xml as input parameter to a procedure and xml file is as shown below which is input to me. 

xml version="1.0"?><DiseaseCodes><Entity><dcode>0</dcode><ddesc>(I87)Other disorders of veins - postphlebitic syndrome</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity><Entity><dcode>0</dcode><ddesc>(J04)Acute laryngitis and tracheitis</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity><Entity><dcode>0</dcode><ddesc>(J17*)Pneumonia in other diseases - whooping cough</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity></DiseaseCodes>.

View 3 Replies View Related

Forms :: Passing Parameters From Menu File

Apr 17, 2012

Is it possible to pass parameters from menu file to form when calling a form from menu item?

View 4 Replies View Related

Forms :: Passing Values Without Using Parameter Or Global

Jan 24, 2012

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.

View 17 Replies View Related

Forms :: Dynamically Passing The Columns Values?

Aug 5, 2013

I am trying a pl/sql block which which take a string and execute it dynamically. Suppose below is string

M_COL := Q'[(P_CODE=> ':DEPTNO',P_CODE_TYPE => 'STATE')]';

Now trying to execute it. using below

M_STR := 'SELECT CHK_DEPT' || M_COL || ' FROM EMP WHERE EMPNO=''7499''';
EXECUTE IMMEDIATE M_STR
INTO M_DATE;

Now what i want is M_STR vairable to executed as

SELECT CHK_DEPT(P_CODE=> DEPTNO,P_CODE_TYPE => 'STATE') FROM EMP WHERE EMPNO='7499'

instead of

SELECT CHK_DEPT(P_CODE=> 'DEPTNO',P_CODE_TYPE => 'STATE') FROM EMP WHERE EMPNO='7499'

other in other way in parameter P_CODE Column value of DEPTNO should be passed.Also note that DEPTNO column in string M_COL is Dynamic.i.e

M_COL := Q'[(P_CODE=> ':DEPTID',P_CODE_TYPE => 'STATE')]'; OR
M_COL := Q'[(P_CODE=> ':EMP_ID',P_CODE_TYPE => 'STATE')]';

View 9 Replies View Related

Forms :: Passing Parameter With Form Link

Jan 5, 2011

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.

View 2 Replies View Related

Forms :: Selecting And Passing Values For A Query?

Sep 6, 2010

I have a form in which the user selects values above from a LOV and then selects a run query button which then uses the values selected in the LOV to refine the query and output the appropriate values.

What i have done in the pre-query trigger is: (the block i am querying is called cars where the block i am selecting values from the LOV is called selection)

:cars.make := :selection.make; (repeated for other fields)

this worked fine untill i introduced a from and to date in my form in which i passed the data through to the query like this:

declare
v_dates_between varchar2(1000);
begin
v_dates_between := 'reg_date between ''' || :selection.from_date || ''' and ''' || :selection.to_date;
Set_Block_Property( 'cars', DEFAULT_WHERE, v_dates_between ) ;

Now i have added the above bit of code the from and to date work fine, but when a car make is selected it still bring back every car make and not just the one selected.

is it possibly because i am setting the where clause in the block property? perhaps i need to now incoperate my other selections into this where clause? are the two blocks exclusive to eachother? and if i put the whole code into the block property I assume i will get problems. E.G. the user leaves a selection criteria blank (if they want to query all car models they wouldnt select one from the list) i assume the query would only return back values which contain no car model which would be 0 records.

View 6 Replies View Related

Forms :: Passing Check Box Values To WHERE Clause?

Oct 26, 2013

I have created a Data block - 'CONTACTS' (Database data block) and has database item - 'Code', 'Descr'

The number of records displayed is set to 5.

Value When checked - 'Y'
Value When Unchecked - 'N'
Check box mapping of other values - 'unchecked'

The requirement is when i check one or multiple checkboxes, i should pass the 'Code' item values to the WHERE clause.

Right now whenver i am trying to do so, only the current record value is copied to the WHERE clause.

I have tried using basic loop as well as while loop but things havmt worked. Below is a basic code which will work for one record, request to guide me with muliple checkbox ticked.

IF :contacts.cb = 'Y' THEN

IF p_where is null then

p_where := :contacts.code;
else
p_where := p_where ||','||:contacts.code;
end if;
end if;
p_where:= 'where code in ('||p_where||')';

View 6 Replies View Related

Forms :: Passing Value From Unix To Forms

May 9, 2011

is there a way where i can pass the value from unix to forms?

View 1 Replies View Related

Forms :: Create Table From Query With Passing Parameters

Oct 20, 2011

I want to create table from query with passing parameters

create table as temp
select * from emp
where hiredate between :sdate and :edate
and deptno = :dpt

when I tried in Toad after passing parameters it gives me error

ORA-01036: illegal variable name/number

View 6 Replies View Related

Forms :: Passing Parameters To Next Page But Values Not Saved

Jul 6, 2010

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 a form which has few textboxes, and few dropdown, and 3 links. Data is entered in few boxes, and then when a link is clicked, it goes to another page, but i want to pass the text in the text boxes, and the selected value from the dropdown also, to be passed as parameters to this link... But since these values are not yet saved, its not getting passed.. like it is something like this in the address bar add_new_event?&event_ id= &event_ name= & event_dt=

View 1 Replies View Related

Forms :: Non Database Block Item Value Passing To Query Up Records

Oct 28, 2011

Version information:
Forms [32 Bit] Version 10.1.2.3.0 (Production)
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

When an user enters a value in a field of a Screen, I want to query up the next screen records based on that user input value in the previous screen.The previous screen is based on a control block i.e.

Q_EMP
items- Q_EMP.emp_id, Q_EMP.FY, Q_EMP.hire_flag.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved