cancel
Showing results for 
Search instead for 
Did you mean: 

Stored Procedure SQL changes after saving

Former Member
0 Kudos
1,842

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...

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member

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.

Breck_Carter
Participant

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.