Download PLATOThe free tool for auditing and tuning your database Version 52 now available  Jul 12, 2010
The DBA-Village forum
as RSS feed
Site Statistics| Ever registered | 41916 | | Total active users | 26385 | | Act. users last 24h | 104 | | Act. users last hour | 4 | | Hits last week | 5303 | | Hits last month | 21663 |
|
Go up
get all
| Message |
Score |
Author |
Date |
hi,
if we pass in parameter we get the result ,...... |
|
coorgi kar |
Mar 11, 2010 |
WHERE empno = ID or id is null
Regards
Miche...... |
|
Michel Cadot |
Mar 11, 2010 |
is not null... |
|
coorgi kar |
Mar 11, 2010 |
WHERE empno = ID or id is null
i need to get a...... |
|
coorgi kar |
Mar 11, 2010 |
And you have.
Regards
Michel
... |
|
Michel Cadot |
Mar 11, 2010 |
You will never get more than 1 emp out of this pro...... |
|
Louis Ywema |
Mar 11, 2010 |
Or return a ref cursor.
Regards
Michel
... |
|
Michel Cadot |
Mar 11, 2010 |
1.say in the drop down in the app.. user selects o...... |
|
coorgi kar |
Mar 12, 2010 |
What you say is meaningless, IN and OUT are mix ...... |
|
Michel Cadot |
Mar 12, 2010 |
| Subject: |
get all |
| Author: |
coorgi kar, India |
| Date: |
Mar 11, 2010, 182 days ago |
| Os info: |
windows |
| Oracle info: |
10g |
| Error info: |
ORA-01403: no data found |
| Message: |
hi,
if we pass in parameter we get the result ,
here if the user does not pass any vaule to in parameter he sould get all the records in EMP table.
how can we do this ?
CREATE OR REPLACE PROCEDURE emp_name_test (ID IN NUMBER, emp_ename OUT varchar2)
IS
BEGIN
SELECT ename
INTO emp_ename
FROM emp
WHERE empno = ID;
END emp_name_test;
/
|
| Goto: |
Reply - Top of page |
If you think this item violates copyrights, please click here
| Subject: |
Re: get all |
| Author: |
Michel Cadot, France |
| Date: |
Mar 11, 2010, 182 days ago |
| Message: |
WHERE empno = ID or id is null
Regards
Michel
|
| Your rating?: |
This reply is Good Excellent |
| Goto: |
Reply - Top of page |
If you think this item violates copyrights, please click here
| Subject: |
Re: get all |
| Author: |
coorgi kar, India |
| Date: |
Mar 11, 2010, 182 days ago |
| Message: |
is not null |
| Your rating?: |
This reply is Good Excellent |
| Goto: |
Reply - Top of page |
If you think this item violates copyrights, please click here
| Subject: |
Re: get all |
| Author: |
coorgi kar, India |
| Date: |
Mar 11, 2010, 182 days ago |
| Message: |
WHERE empno = ID or id is null
i need to get all the record's
|
| Your rating?: |
This reply is Good Excellent |
| Goto: |
Reply - Top of page |
If you think this item violates copyrights, please click here
| Subject: |
Re: get all |
| Author: |
Michel Cadot, France |
| Date: |
Mar 11, 2010, 182 days ago |
| Message: |
And you have.
Regards
Michel
|
| Your rating?: |
This reply is Good Excellent |
| Goto: |
Reply - Top of page |
If you think this item violates copyrights, please click here
| Subject: |
Re: get all |
| Author: |
Louis Ywema, Netherlands |
| Date: |
Mar 11, 2010, 182 days ago |
| Message: |
You will never get more than 1 emp out of this procedure as long as the out-parameter is a varchar2 and you don't concatenate the emps (in a loop or so).
When you want all records to come out of this procedure you will have to construct a table-type which holds all the values.
Louis |
| Your rating?: |
This reply is Good Excellent |
| Goto: |
Reply - Top of page |
If you think this item violates copyrights, please click here
| Subject: |
Re: get all |
| Author: |
Michel Cadot, France |
| Date: |
Mar 11, 2010, 182 days ago |
| Message: |
Or return a ref cursor.
Regards
Michel
|
| Your rating?: |
This reply is Good Excellent |
| Goto: |
Reply - Top of page |
If you think this item violates copyrights, please click here
| Subject: |
Re: get all |
| Author: |
coorgi kar, India |
| Date: |
Mar 12, 2010, 181 days ago |
| Message: |
1.say in the drop down in the app.. user selects only id
then we are getting the ouput
2. say if user does not select any drop down then (that means )he need's all the id.
3.requirement is one or all of the id in IN parameter
|
| Your rating?: |
This reply is Good Excellent |
| Goto: |
Reply - Top of page |
If you think this item violates copyrights, please click here
| Subject: |
Re: get all |
| Author: |
Michel Cadot, France |
| Date: |
Mar 12, 2010, 181 days ago |
| Message: |
What you say is meaningless, IN and OUT are mix up, IN of what, OUT of what.
Reread and fix it.
|
| Your rating?: |
This reply is Good Excellent |
| Goto: |
Reply - Top of page |
If you think this item violates copyrights, please click here
|