SELECT query gives error [message #607949] |
Thu, 13 February 2014 18:15 |
rchenna
Messages: 25 Registered: February 2008
|
Junior Member |
|
|
Hi All,
After importing the data, I get the following error whenever I ran a SQL query. This happens to only few tables and other tables are giving proper result.
SELECT * FROM FR_BONUS_TYPES WHERE rownum < 2
ORA-00936: missing expression
Please help me
Thanks in advance
|
|
|
|
|
|
|
Re: SELECT query gives error [message #607963 is a reply to message #607949] |
Thu, 13 February 2014 23:04 |
Solomon Yakobson
Messages: 3273 Registered: January 2010 Location: Connecticut, USA
|
Senior Member |
|
|
Are you running a script file? If so, most likely there is some non-printable character. For example:
SQL> -- create defective script
SQL>
SQL> declare
2 v_file utl_file.file_type;
3 begin
4 v_file := utl_file.fopen(
5 'TEMP',
6 'bad.sql',
7 'w'
8 );
9 utl_file.put_line(
10 v_file,
11 'select ' || chr(255) || '* from dual;'
12 );
13 utl_file.fclose(v_file );
14 end;
15 /
PL/SQL procedure successfully completed.
SQL>
SQL> -- run defective script
SQL>
SQL> set echo on
SQL> @c:\temp\bad.sql
SQL> select * from dual;
select * from dual
*
ERROR at line 1:
ORA-00936: missing expression
SQL>
SY.
|
|
|
|
|
|
|
|
|
|
|