Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Dave Griffen — — source: Usenet: comp.databases.informix
"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.
$
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.