0

How can user input be taken using Visual Studio Code for an Oracle Database SQL Query?

SELECT LAST_NAME, SALARY FROM EMPLOYEES WHERE SALARY > &salary;

This is the SQL query when executed in Visual Studio Code throws the below error.

SQL: SELECT LAST_NAME, SALARY FROM EMPLOYEES WHERE SALARY > &salary
Error: ORA-01008: not all variables bound

But when the same query executed in SQL Plus works correctly without any error.

  • See if this helps: https://stackoverflow.com/questions/7493028/ora-01008-not-all-variables-bound-they-are-bound – Namandeep_Kaur Aug 24 '20 at 15:49
  • The problem is with Visual Studio Code, with SQL Plus there is no error. The query is executing without any errors. This is related to the error, not the problem related to the Visual Studio Code. – himanshu chopra Aug 25 '20 at 07:21
  • I have never used Visual Studio Code with Oracle SQL. Can just try helping with similar questions on the platform. Here is another link: https://stackoverflow.com/questions/7493028/ora-01008-not-all-variables-bound-they-are-bound. – Namandeep_Kaur Aug 27 '20 at 07:25

1 Answers1

1

For what it is worth, when this question was posted, SQL*Plus commands were not supported with Oracle Developer Tools for VS Code. As of 19.3.3 (Sept 2020) it is now supported.

https://www.oracle.com/database/technologies/appdev/dotnet/odtvscodesqlplus.html

Christian Shay
  • 2,570
  • 14
  • 24