| | |
Accept/Prompt
Please support our Oracle advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Hi All,
I am working in Oracle10g and I have been trying to run the following query, and am getting an error:
Query:
Error:
If the error shows up distorted...the asterisk is located under the semi-colon in the error...
Could anyone guide me accordingly?
I am working in Oracle10g and I have been trying to run the following query, and am getting an error:
Query:
sql Syntax (Toggle Plain Text)
SET VERIFY OFF VARIABLE emp_salary NUMBER ACCEPT empno PROMPT 'Please enter a valid employee number: ' SET AUTOPRINT ON DECLARE empno NUMBER(6):= &empno; BEGIN SELECT salary INTO :emp_salary FROM employees WHERE employee_id = empno; END; /
Error:
sql Syntax (Toggle Plain Text)
empno NUMBER(6):= ; * ERROR at line 2: ORA-06550: line 2, COLUMN 19: 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> avg count current EXISTS max min prior sql stddev sum variance execute forall merge TIME TIMESTAMP INTERVAL DATE <a string literal with character SET specification> <a number> <a single-quoted SQL string> pipe <an alternatively-quoted string literal with character SET specification> <an alternatively-quoted S EMP_SALARY ---------- SQL>
If the error shows up distorted...the asterisk is located under the semi-colon in the error...
Could anyone guide me accordingly?
The man who in view of gain thinks of righteousness; who in the view of danger is prepared to give up his life; and who does not forget an old agreement however far back it extends - such a man may be reckoned a complete man.
~ Confucius, The Confucian Analects
~ Confucius, The Confucian Analects
•
•
Join Date: May 2009
Posts: 1
Reputation:
Solved Threads: 0
Try using $$empno on the where clause.
Lemme know whether it fixes your problem ..
Lemme know whether it fixes your problem ..
•
•
•
•
Hi All,
I am working in Oracle10g and I have been trying to run the following query, and am getting an error:
Query:
sql Syntax (Toggle Plain Text)
SET VERIFY OFF VARIABLE emp_salary NUMBER ACCEPT empno PROMPT 'Please enter a valid employee number: ' SET AUTOPRINT ON DECLARE empno NUMBER(6):= &empno; BEGIN SELECT salary INTO :emp_salary FROM employees WHERE employee_id = empno; END; /
Error:
sql Syntax (Toggle Plain Text)
empno NUMBER(6):= ; * ERROR at line 2: ORA-06550: line 2, COLUMN 19: 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> avg count current EXISTS max min prior sql stddev sum variance execute forall merge TIME TIMESTAMP INTERVAL DATE <a string literal with character SET specification> <a number> <a single-quoted SQL string> pipe <an alternatively-quoted string literal with character SET specification> <an alternatively-quoted S EMP_SALARY ---------- SQL>
If the error shows up distorted...the asterisk is located under the semi-colon in the error...
Could anyone guide me accordingly?
Hi djbabu,
I did try $$empno in the where clause, but it still showed the same error...
I did try $$empno in the where clause, but it still showed the same error...
The man who in view of gain thinks of righteousness; who in the view of danger is prepared to give up his life; and who does not forget an old agreement however far back it extends - such a man may be reckoned a complete man.
~ Confucius, The Confucian Analects
~ Confucius, The Confucian Analects
I did, and that brings about an error...
The man who in view of gain thinks of righteousness; who in the view of danger is prepared to give up his life; and who does not forget an old agreement however far back it extends - such a man may be reckoned a complete man.
~ Confucius, The Confucian Analects
~ Confucius, The Confucian Analects
![]() |
Similar Threads
- problem with update (Oracle)
- Please help with this menu (C)
- need some help implementing a "continue or quit" prompt (Python)
- Unexplained Logon Prompt in Home Network (Networking Hardware Configuration)
- Taking cmmd prompt data into Vb (Visual Basic 4 / 5 / 6)
- download prompt dissapeared (Web Browsers)
- Prompt kept taking me to download PurityScan (Viruses, Spyware and other Nasties)
- Prompt for where to save d/l to (Web Browsers)
- more than half my hard drive space is used after reinstall of xp home (Windows NT / 2000 / XP)
Other Threads in the Oracle Forum
- Previous Thread: Bind a textbox with the database
- Next Thread: select records randomly
| Thread Tools | Search this Thread |
2009predictions acquisition amazon.com bartz bernanke cia citrix cloudcomputing crm database dell economy editor enterprise enterprise2.0 enterprisesoftware federalreserve forbes hp ibm intellipedia internet larryellison layoffs linux loughridge mediawiki michaeljackson microsoft neverland nortel notebooks oil operatingsystem oracle palm rimm saas salesforce sap seagate socialcomputing sql sun sybase technologystocks virtualiron virtualization vmware wiki wikipedia xen yahoo zoho





