上記のコードでは、schemanameを入力として与えています。その入力を使用すると、データベースに接続する必要があります。しかし、この場合、私が入力した値はschemanameによって取られません。Variable-Oracleの使用
declare schemaname varchar2(20);
exec :schemaname := XYZ;
BEGIN
end;
Error report -
ORA-06550: line 2, column 6:
PLS-00103: Encountered the symbol "" when expecting one of the following:
constant exception <an identifier>
<a double-quoted delimited-identifier> table long double ref
char time timestamp interval date binary national character
nchar
ORA-06550: line 4, column 1:
PLS-00103: Encountered the symbol "CONNECT" when expecting one of the following:
いずれかが、それはdeclare
とend
の間のコードは、PL/SQLでスプール
:\ ABC.LST'接尾辞が与えられなかったよう。 '@'はデフォルトで 'C:\ ABC.SQL'になります。したがって、それらは同じファイルではありません。私は混乱を避けるために少なくともスプールの名前をいっぱいに見たいと思っています... –