Re: Getting Line Number Error in a query
Posted in 2005
"Jose J. Sanchez" <jesussanchez@iteso.mx> wrote in message
news:5c671f1f.0502030949.7cc81594@posting.google.com...
> How can i get the line number or position of a syntax error when i execute
a query
>
> lets say for example:
>
> SELECT *
> FROM nonexistent_table
> WHERE id = 1>
> i have an error on line 2,
>
> is there a way to get this information from informix??
As others have said, you can get the information. The method depends on how
you are executing the sql statement. If you pass a sql text file to
dbaccess from command line, it will explicitly state where it found the
error...
$ pg j.sql
database test;
select *from bad_table
$ dbaccess - j.sql
Database selected.
206: The specified table (bad_table) is not in the database.
111: ISAM error: no record found.
Error in line 3Near character position 14
Database closed.
$