Click here to Skip to main content
15,892,480 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi experts,

I need little bit help from you.

I have stored procedure in oracle giving error.
SQL
CREATE OR REPLACE Procedure Select_Dept
(
    A_DEPTNO     IN  DEPT.DEPTNO,
    A_DNAME       OUT DEPT.DNAME,
    A_LOC       OUT DEPT.LOC
)
AS

Begin

    SELECT 
        DEPTNO ,
        DNAME ,
        LOC 
    INTO
       A_DEPTNO ,
       A_DNAME ,
       A_LOC
    FROM DEPT 
    WHERE   DEPTNO = A_DEPTNO 
    ;

EXCEPTION 
        WHEN OTHERS THEN 
             RAISE_APPLICATION_ERROR (-20001,A_DEPTNO || ':$:' || SQLERRM, TRUE) ; 

End Select_Dept ;
/


In Above table is DEPT and PK is DEPTNO.
Can you give me solution.

Thanks in advance.
Mahesh Patel
Posted
Updated 12-Jan-11 22:18pm
v4
Comments
Sandeep Mewara 13-Jan-11 4:07am    
Update question or post error as comment here.
OriginalGriff 13-Jan-11 4:20am    
"Can you give me solution."
No. You haven't told us what the problem is...

1 solution

Oracle PL/SQL != Transact SQL

Syntax is quite different - you'll have to read the documentation, what you need to know is far to much for a Quick Answer

Start with
PL/SQL User's Guide and Reference[^]

Regards
Espen Harlinn
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900