Home » SQL & PL/SQL » SQL & PL/SQL » where clause
where clause [message #273551] Wed, 10 October 2007 21:28 Go to next message
maxim9
Messages: 3
Registered: October 2007
Junior Member
Hello All, how to compare names in where clause.?

l_name varchar2(50)

---

CURSOR
....

OPEN
...

SELECT
..
where name = l_name

it give no data found error.

procedure compiles but failes on execution.

it works

where name = 'Tom'

so how to compare?

Thanks,Maxim

Re: where clause [message #273552 is a reply to message #273551] Wed, 10 October 2007 21:33 Go to previous messageGo to next message
maxim9
Messages: 3
Registered: October 2007
Junior Member
I mean is there, can i use quote? to_char..etc

Thanks in advance

Maximus
Re: where clause [message #273553 is a reply to message #273551] Wed, 10 October 2007 21:35 Go to previous messageGo to next message
BlackSwan
Messages: 25035
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & FOLLOW posting guidelines above.
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/toc.htm

You can find many fine coding examples at http://asktom.oracle.com
Re: where clause [message #273557 is a reply to message #273553] Wed, 10 October 2007 22:14 Go to previous messageGo to next message
maxim9
Messages: 3
Registered: October 2007
Junior Member
Thanks for the reply. I am new here. Can you help? I have to equate t.name = l_name in a where condition. but it gives no data found error. I used to_char, " " also. Did not work

Thanks,Maximus

Re: where clause [message #273561 is a reply to message #273551] Wed, 10 October 2007 22:22 Go to previous message
muzahid
Messages: 281
Registered: September 2004
Location: Dhaka, Bangladesh
Senior Member
Quote:


l_name varchar2(50)

---

CURSOR
....

OPEN
...

SELECT
..
where name = l_name



Did you assign "Tom" to variable l_name.
If possible post your code, we will then go through the code.
Previous Topic: Errors (ORA-03113, ORA-03114) for trigger and deref()
Next Topic: Outer Join Question
Goto Forum:
  


Current Time: Sat Dec 03 20:16:55 CST 2016

Total time taken to generate the page: 0.10588 seconds