Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> dbms_sql and bind_variable
Hi,
I've been using dbms_sql to evaluate sql queries containing functions with no problem, but I tried to include bind variables, and got the following error:
select to_char(new_time(observe_date,'GMT',:TimeZone),'yyyy/mm/dd hh24mi'),
ucan_id, HEATING_DEGREE_DAYS(TMAX, TMIN) from TD3200_DATA where ucan_id =
17297 and observe_date between to_date('12/01/1998','mm/dd/yyyy') and to_date
('12/17/1998','mm/dd/yyyy') order by ucan_id, to_char(new_time
(observe_date,'GMT',:TimeZone),'yyyy/mm/dd hh24mi') SQL Error: ORA-06552:
PL/SQL: Statement ignored ORA-06553: PLS-201: identifier
'HEATING_DEGREE_DAYS' must be declared
It works fine if there is no function in the sql statement, and it also works fine with the function with no bind variable. The combination seems to raise the error. does anyone have any idea why I'm getting this error?
Thanks,
John McDougald
SC Dept of Natural Resources
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Dec 16 1998 - 08:16:54 CST