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

spc's gravatar image

spc
1699918
accept rate: 0%


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.

permanent link

answered 07 Apr '15, 20:57

Breck%20Carter's gravatar image

Breck Carter
27.0k424582830
accept rate: 21%

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.

permanent link

answered 08 Apr '15, 11:07

Elmi%20Eflov's gravatar image

Elmi Eflov
7811014
accept rate: 31%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×102

question asked: 07 Apr '15, 18:56

question was seen: 431 times

last updated: 08 Apr '15, 11:07