home *** CD-ROM | disk | FTP | other *** search
- THE SSQL USER ENVIRONMENT
-
- EDIT - USING YOUR OWN TEXT EDITOR / WORD PROCESSOR
-
- Since it is difficult to learn a new environment with every new
- program, you can specify your very own text editor or word
- processor in a file called EDIT.FIL which is in the same
- directory as SSQL. The current content of EDIT.FIL is:
- C:\PCWRITE\ED
- This means that the word processor chosen is PC-Write which is in
- the PCWRITE directory on drive C and the command used to invoke
- PC-WRITE is ED. You can replace the above line with the path and
- program name of your word processor. The word processor must
- be capable of producing a simple text file as described below
- under CALL SCRIPT FILE. From within SSQL, you can type SQL
- commands from the SSQL prompt. If you want to revise the
- previous prompt, you can type:
- edit <ENTER>
- and the previous SQL statement will be loaded into you word
- processor with the file name of RUN. This assumes that the
- file name can follow the command for your text editor. When
- you exit your word processor the revised statement is in the
- file RUN. To call the file type:
- @run <ENTER>
- This is what is typically known as a script file. More details
- below.
-
- @ - CALL SCRIPT FILE
-
- Now you have the ability to create a text file with a SQL
- command and call the text file from SSQL by preceeding the file
- name with a "@". The file must be text only, no special
- wordprocessing formats allowed. PC-Write is an excellent
- choice because it is always produces standard text. If you use
- WordPerfect, save the file using Text Out (Ctrl-F5). If you
- use Wordstar, I feel sorry for you but anyway, use the non-
- document form.
-
- Now you can create a file called MGRORG which contains:
-
- select name
- from emp
- where enum in
- (select mgrn
- from emp
- where enum in
- (select sn
- from sales,cust
- where cc = code
- and name = 'Organomice'));
-
- From SSQL, you would simply type:
- @MGRORG
- The file you created would be displayed on the screen and then
- the result would appear.
-
- By the way, the above select statement answers one of the
- questions in the appendix.
-
- ENV-1
-
-