When I create complex views as normal sql queries, complete with comments and a style of indentation that I am comfortable with - - I find when I then create the view and come back to edit it -- it has been massively reformatted by sql anywhere.

Is there any way to preserve my desired formatting? I admit that my style is highly influenced by my experience with MS SQL Server, which does not do any reformatting of my views.

asked 22 Apr '14, 02:21

BillClune's gravatar image

BillClune
46224
accept rate: 0%

That was it - thanks!!

(22 Apr '14, 10:34) BillClune

Make sure the preserve_source_format database option is on.

See

http://dcx.sybase.com/index.html#1201/en/dbadmin/preserve-source-format-dboptions.html

permanent link

answered 22 Apr '14, 03:52

Vincent%20Buck's gravatar image

Vincent Buck
70681520
accept rate: 15%

In addition to Vincent's answer: The preserve_source_format option has existed for many years and the default has always been 'ON'.

If it is 'OFF' in your database, you should check all other database options to make sure the same [cough] evil influence hasn't damaged some other setting... 99.99% of the time in SQL Anywhere the defaults are what you want, as opposed to other DBMS products.

permanent link

answered 22 Apr '14, 08:56

Breck%20Carter's gravatar image

Breck Carter
27.0k424582830
accept rate: 21%

edited 22 Apr '14, 08:57

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:

×9

question asked: 22 Apr '14, 02:21

question was seen: 376 times

last updated: 22 Apr '14, 10:34