Open .SQL files

Shane42

Member
Most of the staff at my company uses Toad, but I have found I like PL/SQL developer better.

All of the database scripts (Packages, procedure, functions, etc.) have .SQL extensions and when you use Toad, Toad auto detects the content of the files and loads it into the appropriate type of Toad editor.

I can't seem to figure out a way to get PL/SQL developer to do that same thing.

Is there a setting to do this?

Shane
 
PL/SQL Developer does indeed only use the extension to differentiate between files for SQL Windows, Program Windows, Command Windows, and so on.
 
What I do is I just got into the habit of always opening the file from within the PL/SQL developer menu (file/open/program file for example).
Our files are stored on a UNIX server, so I also use the ftp plug-in to open them and it saves me time from moving the files back and forth.

If I open .sql files from Windows Explorer I have it so the file opens up Notepad++. It opens faster and usually when I open it this way I just want to do a quick look and not do much coding.
 
Just found the same thing at my new job (fortunately it's a PL/SQL Dev site :) ) - everything is .sql, so anything I drag-drop becomes an SQL window. It's an extra manual step to right-click and change the window type. (It also means package spec and body scripts have to have _spec and _body in the name. Yes, the naming convention was set by idiots.)

It would be nice if PL/SQL Dev could scan for CREATE OR REPLACE, DECLARE etc and choose the appropriate window type.
 
I've done following to help myself with this behavior.
I've created new toolbar and added buttons from File->Change window to. Now, with one easily accessible button click I can change window type. Additionally if you add files to project, it can remember window type at time when you pressed "Add to project".
 
We have the same set-up, and since .sql files are more likely to have package header/bodies than anything else I changed Preferences->Files->Extensions and moved "sql" up under "Program Files". Dropping sql files opens them in a program window, and double-clicking opens them in Notepad++.
 
Back
Top