sql syntax validation?

sql syntax validation?

1
NewbieNewbie
1

    Dec 01, 2004#1

    Can ue do this? And if yes.. how?

    1

      Dec 20, 2004#2

      Omeslo;

      I use UE to do all my SQL work. And to answer your question, yes, it is possible.

      First download one of the SQL word files (there is a PL/SQL word file and an Oracle SQL word file) and put it in your UE installation directory. BTW, both word files were created for Oracle 8i and earlier. If you are using 9i or later, you will need to manually update them for the new words.

      Next, in UE go to your Advanced menu, and select Configuration. Go to File Types and define *.SQL as one of your file types. Then go to file associations and define *.SQL as one of your associations. Yeah, I know, this means some work, but if you're going to do this, do it right.

      O.k. you're about done. This is where the word file comes into play. Stay on the Configuration menu. This time go to Syntax Highlighting. Under Language, select an *unused* language assignment. At the bottom of this menu, in the area where it says "Full path name for word list", press the Browse button and find the SQL word list file. Then click OK. Make sure the boxes underneath are all checked (you can uncheck them later once you determine which options you want/don't want). For now, turn them all on.

      Once you have all areas completed (File Type, File Association, and Syntax Highlighting) you are all done. Just click OK to activate your settings.

      Rename all existing .SQL files on your harddrive with the .SQL extension (if you haven't already saved them with the .SQL extension). Also all future files you create should have the .SQL extension. Then every time you open them with UE, you should see all syntax highlighted.

      I hope this helps. 8)
      Doug.

      17
      Basic UserBasic User
      17

        Aug 04, 2006#3

        Hi,

        that only covers Syntax Highlightning, but not Validation.

        Syntax Highlightning = Marks the appropriate Syntax with colors, but does nothing else

        Validation = Checks if the code is correct and would run without errors upon execution.

        So that topic is still open. One possibility is to use external SQL validation tools. Unfortunately they stop on the first error.

        So my question is if the programmers of UltraEdit would make a tool in UE that parse SQL files to the end and in case of errors, have the errors displayed in the output window where I can comfortably jump to incorrect lines.

        6,687587
        Grand MasterGrand Master
        6,687587

          Aug 04, 2006#4

          If there is such a SQL validation tool, why do you not integrate it into UltraEdit with an user tool with capturing the output from the SQL validation tool?

          The HTML validation with "built-in" HTML Tidy is nothing else than using tidylib.dll instead of the EXE and so the HTML writers don't need to download the Tidy EXE and setup an user tool with it by itself. HMTL Tidy was not written by the IDM developers. It was first written by Dave Ragget and is continued now at SourceForge HTML Tidy Library Project.

          The XMLlint tool for validating XML files, the CSE HTML Validator tool, Ctags, Ruby (UEStudio), ... are all not developed by IDM. They are just integrated by IDM in the user interface for easier usage by the user.

          I'm not familiar with SQL. Maybe an other SQL user knows a good validation tool which does not stop at first error. But it could also be that the SQL validators stop at first error because further interpreting is simply not possible with certain type of errors.
          Best regards from an UC/UE/UES for Windows user from Austria

          1
          NewbieNewbie
          1

            Aug 06, 2006#5

            Hi HansFink,

            You also failed to mention what version of SQL you are talking about. Every database and version has a different set of SQL commands that they support. With over 10 very popular databases and countless versions of those databases it would be quite a feat for an editor to handle this natively. You also cannot rely on ANSI-SQL as then you will get a false failure when you use any feature that is non-standard.

            Your bets bet will to be use an external validator that you found and there is nothing wrong with the validator returning the first error.

            6
            NewbieNewbie
            6

              Jun 05, 2007#6

              Hi All.

              I working with DB long time. If you need compile SQL code, you need run the scripts on the database. As saying somebody before me, there are many types of DB. I using UES with Oracle DB. If I want check my script, I must defined TOOL for run scripts... I dont remember exactly, how is right setup the tool (I reinstall UES and forgot settings), you need setup command path\sqlplus.exe with login parameters and second parameter is path + name of file...

              I try remember the settings, check in UES and if I will be succes, I write correct settings...