Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Great SQL editor??

Re: Great SQL editor??

From: Frank Hubeny <fhubeny_at_ntsource.com>
Date: 2000/08/05
Message-ID: <398BA529.2CEB515E@ntsource.com>#1/1

As Naill Litchfield mentioned, there is a version at the ultraedit site: http://www.ultraedit.com

However, it is easy to create your own wordfile.

The first line is the language id line. Since I only use the sql extension for plsql and do not want keywords capitalized, the following is what my line looks like.

/L1"PLSQL" Line Comment = -- Block Comment On = /* Block Comment Off = */ Nocase String Chars = ' File Extensions = SQL

The second line is the delimiters:

/Delimiters = ()&|:,-=>[<+]!/*^@;%"

The third line identifies the functions or procedures, so that they appear in a window.

/Function String = "%[ \t]*^{procedure^}^{function^} ^([a-zA-Z0-9_#$]+^)"

Now you have options for color coding and it depends on how you want to divide the database objects you use.

I have made /C1"Reserved Words" which I got from v$reserved_words. I don't necessarily place too much faith in this list of reserved words. For example, it doesn't contain words like "exception", but does have "except" and "exceptions". You may also have to add functions like chr and substr. Or include them elsewhere. I use this list as a set of words to avoid and color them so that I don't use them as names.

/C2"Packages" could be the packages you are working on. Note that if you named these packages with a similar prefix they can be easily colored by just writing the prefix such as ** dbms_ utl_

and the remainder of my wordfile.txt is something like the following:

/C2"Packages"
** devdes dis tf5f tf5f_test wordlist
/C3"Tables"
/C4"Supplied Packages"
** dbms_ utl_
/C5"Views"
** all_ dba_ user_ v_$ v$ x_$ x$
/C6"Special Permission"
** sys. system.
/C7"Web"
** htf. htp. owa. owa_util.

The other half of the problem is how to color these keywords. One thing that I have found useful is to color the backgrounds of the literals (Strings and Numbers) a bright color such as yellow and the foreground black. This makes these elements stand out. So if I see a lot of yellow floating through my code, I know it is time to refactor.

Frank Hubeny

alans75 wrote:

> Has anyone updated UltraEdits' wordfile.txt to allow formatting
> to handle the SQL language?
> And maybe TransactSQL too? Or even PLSQL?
>
> Alan
>
> -----------------------------------------------------------
>
> Got questions? Get answers over the phone at Keen.com.
> Up to 100 minutes free!
> http://www.keen.com
Received on Sat Aug 05 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US