472,805 Members | 1,058 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,805 software developers and data experts.

Parameter Store procedure

23
hi

can any one tell me how to run the store procedure where one of its parmeter has OUT and when i execute i want to get the values .

Its argent reply.
Apr 24 '07 #1
3 1629
chandu031
78 Expert
Hi,

Here's an example:

declare count1 number;
begin
sample_procedure(count1);
dbms_output.put_line(count1);
end;
Apr 26 '07 #2
debasisdas
8,127 Expert 4TB
procedure
===========
CREATE OR REPLACE PROCEDURE PROC1(NUM NUMBER,NAME OUT VARCHAR)
IS
BEGIN
SELECT ENAME INTO NAME FROM EMP WHERE EMPNO=NUM;
END;
------------
execution
-------------------
declare
n varchar2(10);
begin
proc1(7788,n);
dbms_output.put_line(n);
end;




hope u find the trick
all the best
Apr 26 '07 #3
debasisdas
8,127 Expert 4TB
ex-2
-----------
Expand|Select|Wrap|Line Numbers
  1.  
  2. create or replace procedure testproc(no emp.empno%type,rec out emp%rowtype)
  3.  is
  4.  cursor c is select * from emp where deptno=no;
  5.  begin
  6.  open c;
  7.  loop
  8.  fetch c into rec;
  9.  exit when c%notfound;
  10.  DBMS_OUTPUT.PUT_LINE(rec.empno||'       '||rec.ename||' ' ||rec.job||' ' ||rec.sal);
  11.  end loop;
  12.  close c;
  13.  end ;
  14. -----------------------------------
  15. TO EXECUTE
  16. -----------------------------------
  17.  declare
  18.  r emp%rowtype;
  19.  begin
  20.  testproc(10,r);
  21.  end;
  22.  
  23.  


now try few more yourself
Apr 26 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Berend | last post by:
I am trying to pass multi values into a where clause with an in clause in a store procedure to use in a Crystal report. This can change depending on the user. Maybe there is another way to pass...
1
by: blackpuppy | last post by:
Can I pass a sort expression into a store procedure as a parameter? I want to do sth like the following but do not know if it's possible. Maybe I need some tricks to work around? CREATE...
1
by: Hugo Lefevre | last post by:
Dear, I have a problem : I have a database which contains my data of hardware. The Id is a varchar and I want at my filling form that my user know which is the last one. So I made a store...
0
by: kids_pro | last post by:
Hi there, I create a store procedure call GetPayment(@dtFrom DATETIME, @dtEnd DATETIME) After that I design a report using that store procedure I select crystal report in this case. I can...
1
by: Hrvoje Voda | last post by:
How to get a parameter from store procedure ? Hrcko
1
by: Hrcko | last post by:
How to read a parameter from store procedure? I want to get a number of rows for the specific tabel. The parameter is @@ROWCOUNT. Hrcko
4
by: Ranginald | last post by:
Hi, I'm having trouble passing a parameter from my default.aspx page to my default2.aspx page. I have values from a query in a list box and the goal is to pass the "catID" from default.aspx...
6
by: c676228 | last post by:
Hi everyone, I wrote a store procedure that fetch one row data in the database based on the parameter value I entered. After I created the store procedure, the store procedure code looks like...
9
by: serge | last post by:
/* Subject: How to build a procedure that returns different numbers of columns as a result based on a parameter. You can copy/paste this whole post in SQL Query Analyzer or Management Studio...
0
by: Mark C. Stock | last post by:
"Mark C. Stock" <mcstockX@Xenquery .comwrote in message news:... | | "Berend" <Berend.Brinkhuis@evatone.comwrote in message | news:bdd9ac20.0401271301.22cdb65e@posting.google.com... | | I am...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.