I need a SQL Syntax Formatter for ASA online. Does exists specific for ASA?

asked 10 Nov '09, 14:05

Cesar's gravatar image

Cesar
97315
accept rate: 0%

edited 26 Jan '10, 12:17

Breck%20Carter's gravatar image

Breck Carter
26.3k430600866


There are a couple of vim plugins that may be what you want:

http://www.vim.org/scripts/script.php?script_id=356

and also script_id=1572

permanent link

answered 10 Nov '09, 15:24

Tom%20Slee's gravatar image

Tom Slee
1.2k21429
accept rate: 29%

Thank you for answer.

(10 Nov '09, 15:38) Cesar

For documentation purposes I use Notepad++ with syntax highlighting. You can export the colored source as RTF to a clipboard and past it directly into Word, Notes, ....

permanent link

answered 10 Nov '09, 17:49

Thomas%20Duemesnil's gravatar image

Thomas Dueme...
2.6k243561
accept rate: 17%

Have you found a specific SQL Anywhere plugin for Notepad ++ or are you using the default SQL language packaged with the program? I find the default misses some things like the // for comments or the endif.

(20 Sep '10, 20:26) Siger Matt

I have used the standard sql plugin. Was enough for my needs.

(21 Sep '10, 09:42) Thomas Dueme...

Hi

You may want to try this one helpful: http://www.dpriver.com/pp/sqlformat.htm

While they don't have special SQL Anywhere mode, SQL Server or Generic mode is pretty much sufficient in my experience.

Hope it helps


Leonid's suggestion is excellent! A truly easy-to-use interface, based on (apparently) some pretty powerful software. I threw what I thought was a deal-breaker at it, a funkadelic UPDATE from inside the Foxhound database monitor, and all it did was object to the ORDER BY in the LIST function. Apparently the desktop (for money?) version has an "ignore syntax errors" option. Anyway, here is the original code, followed by the output from dpdriver.com after the LIST ORDER BY was removed..

UPDATE rroad_group_2_property_pivot
          INNER JOIN ( SELECT temp_lock.blocked_connection_number,
                              temp_lock.blocker_connection_number,
                              temp_lock.blocker_owner_name,
                              temp_lock.blocker_table_name,
                              LIST ( STRING (
                                 temp_lock.blocker_lock_class, ' ',
                                 temp_lock.blocker_lock_duration, ' ',
                                 temp_lock.blocker_lock_type ),
                                 ', ' ORDER BY temp_lock.blocker_lock_type ) AS blocker_reason,
                              temp_lock.blocker_row_identifier
                         FROM temp_lock
                        GROUP BY temp_lock.blocked_connection_number,
                              temp_lock.blocker_connection_number,
                              temp_lock.blocker_owner_name,
                              temp_lock.blocker_table_name,
                              temp_lock.blocker_row_identifier ) AS temp_lock
             ON  temp_lock.blocked_connection_number = rroad_group_2_property_pivot.connection_number
             AND temp_lock.blocker_connection_number = rroad_group_2_property_pivot.BlockedOn
   SET rroad_group_2_property_pivot.blocker_owner_name     = temp_lock.blocker_owner_name,
       rroad_group_2_property_pivot.blocker_table_name     = temp_lock.blocker_table_name,
       rroad_group_2_property_pivot.blocker_reason         = temp_lock.blocker_reason,
       rroad_group_2_property_pivot.blocker_row_identifier = temp_lock.blocker_row_identifier
 WHERE rroad_group_2_property_pivot.sample_set_number = @sample_set_number;

Formatted:

UPDATE rroad_group_2_property_pivot
       INNER JOIN (SELECT   temp_lock.blocked_connection_number,
                            temp_lock.blocker_connection_number,
                            temp_lock.blocker_owner_name,
                            temp_lock.blocker_table_name,
                            List(String(temp_lock.blocker_lock_class,' ',temp_lock.blocker_lock_duration,
                                        ' ',temp_lock.blocker_lock_type),', ') AS blocker_reason,
                            temp_lock.blocker_row_identifier
                   FROM     temp_lock
                   GROUP BY temp_lock.blocked_connection_number,
                            temp_lock.blocker_connection_number,
                            temp_lock.blocker_owner_name,
                            temp_lock.blocker_table_name,
                            temp_lock.blocker_row_identifier) AS temp_lock
         ON temp_lock.blocked_connection_number = rroad_group_2_property_pivot.connection_number
            AND temp_lock.blocker_connection_number = rroad_group_2_property_pivot.blockedon
SET    rroad_group_2_property_pivot.blocker_owner_name = temp_lock.blocker_owner_name,
       rroad_group_2_property_pivot.blocker_table_name = temp_lock.blocker_table_name,
       rroad_group_2_property_pivot.blocker_reason = temp_lock.blocker_reason,
       rroad_group_2_property_pivot.blocker_row_identifier = temp_lock.blocker_row_identifier
WHERE  rroad_group_2_property_pivot.sample_set_number = @sample_set_number;
permanent link

answered 13 Nov '09, 14:44

Leonid%20Gvirtz's gravatar image

Leonid Gvirtz
2814615
accept rate: 0%

edited 13 Nov '09, 17:54

Breck%20Carter's gravatar image

Breck Carter
26.3k430600866

There are a couple of vim plugins that may be what you want:

dbext.vim : Provides database access to many dbms (Oracle, Sybase, Microsoft, MySQL, DBI,..)

script_id=356

SQLComplete.vim : SQLComplete is a SQL code completion system using the omnifunc framework

script_id=1572

Actually, the above 2 do not format the SQL, but this Vim plugin does:

SQLUtilities : SQL utilities - Formatting, generate - columns lists, procedures for databases

http://www.vim.org/scripts/script.php?script_id=492

Dave

permanent link

answered 16 Nov '09, 13:59

Dave's gravatar image

Dave
111
accept rate: 0%

You could also look at SQL Assistant. There is an old version available that is free. It come preconfigured to itergrate with a number of tools like Toad and ultraEdit( must be 15 on the list). The version I found was 3.5.1 and it said it was free but the about page is indicating it only has 14 days left on trail. Oh well it is something to look at.

permanent link

answered 03 Mar '11, 22:03

Jay%20Turner%201's gravatar image

Jay Turner 1
1
accept rate: 0%

I use this from Werysoft, I found it after following a link on here to their query builder, I don't think it has a Sybase option but the generic SQL mode seems to work quite nice. Werysoft SQLFormatter

permanent link

answered 04 Mar '11, 11:07

Daz%20Liquid's gravatar image

Daz Liquid
861182338
accept rate: 28%

1

How old is this thread !!!

(04 Mar '11, 11:08) Daz Liquid
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:

×10
×1

question asked: 10 Nov '09, 14:05

question was seen: 1,970 times

last updated: 04 Mar '11, 11:07