|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi, this is my problem, in the PL/SQL program type I have this..
nick char(15); begin select name_client into nick from user where code_client = 200; end; of course, name_client is a char type also, but when I ask for variable NICK in return, gives me always nothing (a null value), I hope if anyone knows what I am doing wrong or if there is another way of doing this same kind of idea (saving in a local variable the value of one row of a table)... dani2003_oracle... |
|
#2
|
|||
|
|||
|
Hi! That is the way that I typically save a value to a local variable. Just to be certain, is there a record with code_client=200 and code-client is a number and not a character? Also, what is your return statement like?
__________________
Oh I wish, I wish I hadn't killed that fish... |
|
#3
|
|||
|
|||
|
this is what I have...
Actually, I have this code above inside an oracle function, so I ask in return of the function the nick value, and that's when it returns me the null value. Code_client is a number that identifies that client in my company, and I'm sorry but I don't understand what you mean by record, but anyway, this select should only give one value, because there is just one code for each client. Hope you can help me again...
![]() dani2003_oracle |
|
#4
|
|||
|
|||
|
Hi! Sorry if I was clear with the last post. The code that you have posted seems fine to me. My first thoughts were that you would get a null value if there wasn't a record in your "user" table that had a client_code of 200 or that there was no return statement in the code. Is there more code that you could post?
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > General SQL Development > select into problem !!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|