Skip to Content
avatar image
Former Member

Quotes from heck and other format anomalies

How come if I type in code for a procedure, use 4-space indents and blank lines, that upon viewing the code in SQL Central the code is 2-space indented, the blank line is stripped out, and ALL identifiers are quoted (even though I told the editor to not quote identifiers)? There seems to be no way to create nice-looking, readable code. The code below was NOT the way it was typed in. Yes, the snippet was taken from a Toad screenshot, but SQL Central is similar.

SQL Anywhere 16

Message was edited by: Larry Molter

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 14, 2014 at 02:24 PM

    According to Sybase: SQL Anywhere by default conforms to SQL/92 standards that says, "Quote all database identifiers". MSSQL T-SQL says don't. I'm just used to the lack of quotes. I guess the last company I was at had the quoting turned off. Makes for less busy-looking code. Oh, well...

    Oh, but why are the leading spaces and blank lines being deleted? I goes against my grain to write sloppy-looking, unformatted code.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Jason Hinsperger

      No source control here for database objects. DBA squashed my request to turn the flag on. I guess no one gives a hoot about readability and maintainability. I'm a bit of a perfectionist in this regard. It's hard to come down off of the cloud I'm on ;-)

  • Oct 17, 2014 at 01:31 PM

    If you store and maintain all your database source code in separate text files, just like folks do with other source code like *.c and *.cpp files, you can have complete control over the formatting regardless of other people's [cough] misguided behavior.

    The dbisql utility together with READ and PARAMETERS statements are very powerful tools for maintaining SQL objects, much more powerful than Sybase Central.

    Add comment
    10|10000 characters needed characters exceeded