Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

customAccept.sql is not working #32

Open
wienerri opened this issue Mar 16, 2021 · 2 comments
Open

customAccept.sql is not working #32

wienerri opened this issue Mar 16, 2021 · 2 comments

Comments

@wienerri
Copy link

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>

@bamcgill
Copy link
Member

bamcgill commented Jan 21, 2022

@wienerri What SQL are you running there.

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> 

@wienerri
Copy link
Author

wienerri commented Jan 21, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants