Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

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

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
accept rate: 20%

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
accept rate: 36%

Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 07 Apr '15, 18:56

question was seen: 1,616 times

last updated: 08 Apr '15, 11:07