Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bind a runtime variable in Select statement?

Status
Not open for further replies.

jackiev

MIS
Aug 16, 2000
56
0
0
US
I suspect this has a simple solution. Please help this SQL code newbie.

This select statement :

Select g.NOTIF_NAME, h.AW_NOTIF_EMAIL, g.NOTIF_ACTIVITY_DATE
from NOTIF g, NOTIF_DETAIL h
where g.aw_notif_seq = h.aw_notif_seq
and h.AW_NOTIF_EMAIL like '&email'
order by 1,2

gives me error:
ORA-01008: not all variables bound

How do I BIND this runtime parameter?
 
Hi

[ul]
[li]Are you sure this is related to MySQL ? Looks like Oracle to me.[/li]
[li]Are you sure the error occurs in that statement ? I see no variable to bind there.[/li]
[li]Next time please post your code between [tt][ignore]
Code:
[/ignore][/tt] and [tt][ignore]
[/ignore][/tt] TGML tags. Its much readable that way.[/li]
[/ul]


Feherke.
feherke.ga
 
him

"ORA" is Oracle, You might try forum759.

You have a parameter: email
 
Thanks for the help.
I will try the options you suggested.
 
Hi

SkipVought said:
You have a parameter: email
Oops. I completely forgot substitution variables. ( Mainly used bind variables and even that was long time ago. )

Then email should be defined somewhere before that [tt]select[/tt] statement :
SQL:
define email = 'fake@example.com'


Feherke.
feherke.ga
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top