You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SQL> help accept
ACCEPT
------
Reads a line of input and stores it in a given substitution variable.
ACC[EPT] variable [NUM[BER] | CHAR | DATE | BINARY_FLOAT | BINARY_DOUBLE]
[FOR[MAT] format] [DEF[AULT] default] [PROMPT text | NOPR[OMPT]] [HIDE]
SQL> accept answer number
42
SQL> select &answer from dual;
old:select &answer from dual
new:select 42 from dual
42
_____
42
SQL>
I tried to run example file from this project - exactly this - customAccept.sql
I think this file is a litle bit broken, but maybe I do something wrong.
In this file is
select ^ANSWER from dual;
That is failed.
I tried customAccept.sql and I have got SQL Error: ORA-00936
SQLcl: Release 20.4 Production on Út Bře 16 09:56:05 2021
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Last Successful login time: Út Bře 16 2021 09:56:11 +01:00
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.8.0.0.0
The answer to the ultimate question? 42
running: select ^ANSWER from dual
Error starting at line : 26 File @ H:\Data\sql_developer\sql\answer.sql
In command -
select ^ANSWER from dual
Error at Command Line : 26 Column : 8 File @ H:\Data\sql_developer\sql\answer.sql
Error report -
SQL Error: ORA-00936: chybí výraz
00936. 00000 - "missing expression"
*Cause:
*Action:
SQL>
The text was updated successfully, but these errors were encountered: