Re: SQL syntax checker
Posted in 1993
David Cortesi — — source: Informix-list mailing list archive (1991-1998)
In article <27l6d1INNj5f@emory.mathcs.emory.edu> das@trac3000.ueci.com (David Snyder) writes: >Is there any way I can check the syntax of an SQL statement without actually >executing it? Is there some un-documented option to isql that can do this? Either PREPARE or DESCRIBE could be used for this. With PREPARE (possibly both?) the offset to the point of a detected error comes back in the sqlca (I forget where). With DESCRIBE you can find out the verb, the columns and their types, and whether a DELETE/UPDATE would affect all rows in the table (how else did you think ISQL knew that?). You could use PREPARE from ISQL (if you could handle the nested quotes :-) or 4GL. Dave Cortesi cortesi@netcom.com