Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Use of varchar2 - please help!

Use of varchar2 - please help!

From: Dan Hess <dah23_at_cornell.edu>
Date: Tue, 15 Jun 1999 00:37:56 -0400
Message-ID: <3765D8A4.AF629D79@cornell.edu>


The problem is, it seems to me the two methods below are identical. The first one yields at outcode of 17, while the second yields an outcode of 12. The user with that username/password IS in the database. Why doesn't the first method yield a 12?

Please help!

uname varchar2(20) := 'bobmeister';
pwd varchar2(20) := 'godgod';
outcode integer;

userval theuser%rowtype;

begin

delete from test2;

 open theuser;
 fetch theuser into userval;

 if theuser%found then
  outcode := 12;
 else
  outcode:=17;
 end if;

 delete from test;
 insert into test values(outcode);

 close theuser;
end;
/ Received on Mon Jun 14 1999 - 23:37:56 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US