
May 8th, 2003, 01:25 PM
|
|
Junior Member
|
|
Join Date: May 2003
Posts: 9
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
select into problem !!! please help !!!
Ok, so I have this pl/sql code in an oracle funtion...
(userWEB char) return number is
nick char(15) := 'a';
result number := 0;
BEGIN
select nick_user into nick from user_table where nick_user = userWEB;
if (nick = 'masteruser') then
result:=1;
else
result:=0;
end if;
return result;
END;
so the idea is to recieve the name of one user (userWEB) and to see if that user is in the table (user_table). So the strange thing is that when is true (when the userWEB name is 'masteruser') it returns the value of 1, but when I put some other name (for instance 'materus') it doesn't return me anything, not even 0, just nothing. I have tried also to ask if nick is null but also it doesn't return me the value that I have asigned in the code... can anyone out there help me !!! I have to resolve this code bad and soon... I will very thankfull...
dani2003_oracle
|