我找到了这个PL / SQL代码,但我在Oracle文档中找不到有效的代码:
CREATE OR REPLACE PROCEDURE hard_priv AS
BEGIN
HTP.htmlOpen;
HTP.headOpen;
HTP.title (.Account Information.);
HTP.headClose;
HTP.bodyOpen;
HTP.br;
HTP.print('User ID: ' ||
OWA_SEC.get_user_id || '');
HTP.print('User Password: ' ||
OWA_SEC.get_password || '');
HTP.br;
HTP.bodyClose;
HTP.htmlClose;
END hard_priv;
END uu_hr_pkg;
答案 0 :(得分:2)
(.
”和“.)
”不是PLSQL语法。所以无法编译。
这很简单:
begin
dbms_output.put_line('this is the right syntax');
dbms_output.put_line(.this_dont_work.);
end;
/
出现如下编译错误:
SQL> @a dbms_output.put_line(.this_dont_work.); * ERROR at line 3: ORA-06550: line 3, column 26: PLS-00103: Encountered the symbol "." when expecting one of the following: ( ) - + case mod new not null <an identifier> <a double-quoted delimited-identifier> <a bind variable> table continue avg count current exists max min prior sql stddev sum variance execute multiset the both leading trailing forall merge year month day hour minute second timezone_hour timezone_minute timezone_region timezone_abbr time timestamp interval date
在现实世界中,您必须将其替换为'
;你的东西应该是:
CREATE OR REPLACE PROCEDURE hard_priv AS
BEGIN
HTP.htmlOpen;
HTP.headOpen;
HTP.title ('Account Information');
HTP.headClose;
....