I've noticed that in some cases a stored procedure I have created by manually constructing the SQL has its syntax change after saving and re-opening the SP. Specifically "WHERE IN" gets changed to "= ANY". Is this an automatic optimization of the syntax occurring? Thanks...
asked 07 Apr '15, 18:56
Please show us a before-and-after example.
You may be seeing an example of the optimizations performed during query processing.
If you want SQL Anywhere to store the before and after versions of the source code, see the preserve_source_format option.
answered 07 Apr '15, 20:57
I'm assuming by re-opening you mean reading the procedure definition from proc_defn field of the SYSPROCEDURE view. The text stored in proc_defn is the server view of the procedure once it has been parsed and unparsed, so some modifications of the syntax and/or spacing are expected.
As Breck has pointed out, in order to view the original source, you would need to preserve_source_format.
answered 08 Apr '15, 11:07