Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> oracle procedure equivelent
I have a procedure below created in Interbase (the first half of it). I
am in the process of converting to oracle. The procedure takes in
username and password as parameters and returns the variables descibed
in the RETURNS clause below.
CREATE PROCEDURE CSNTAUTHUSERPAP (CSNTUSERNAME CHAR(30), CSNTPASSWORD
CHAR(30))
RETURNS (CSNTRESULT INTEGER, CSNTGROUP INTEGER, CSNTACCTINFO CHAR(15),
CSNTERRORSTRING CHAR(50), CSNTPASS CHAR(30)) AS
DECLARE VARIABLE syspassword VARCHAR(30);
DECLARE VARIABLE sysusername VARCHAR(30);
begin
CSNTresult = 4;
CSNTacctinfo = "";
CSNTpass = "";
CSNTgroup = 0;
CSNTerrorstring = "";
select customer_n, anusername, anpassword, angroup
from internet
where anusername = :csntusername
and anpassword = :csntpassword
into :CSNTacctinfo, :sysusername, :CSNTpass, :CSNTgroup;
if (sysusername is not NULL) then
begin
CSNTresult = 0;
CSNTerrorstring = "authentication successful";
end
The procedure then goes on with an else statement to pass back unsuccessful authentication. How do I implement this procedure in oracle
Thanks in advannce
Cheers! Received on Thu Oct 14 1999 - 03:56:51 CDT