Re: Pl Help: How to save QUERRY W/ohter formating commands

From: Unknown User <unknown_at_unknown.com>
Date: Sun, 22 Jul 2001 10:01:49 -0700
Message-ID: <cc1mltc272m5ii1s993agtfaqq5c52937f_at_4ax.com>


Hi,

Here is a sample script. Save it with the *.sql extension and place it in the "working directory" of your shortcut. You can do this by right-clicking on properties and entering the full directory path in the "Start in:" field.

COLUMN employee_name HEADING 'Employee Name' COLUMN project_name HEADING 'Project Name' select * from scott.emp
/
select * from scott.dept
/

Hope it helps.

On 21 Jul 2001 20:55:04 -0700, mschalla_at_aol.com (ZAN) wrote:

>> I am new to Oracle and I have Oracle 8i Personal edition on my PC. I have
>> windows 98.I have OREILLY BOOK ORACLE SQL PLUS (DEFINITIVE GUIDE) by
>> Jonathan Gennick and I am in chapter 3 where I am having problems saving the
>> colums and with other formating commands with the querry for later use. I can
>> only save it temporary in the buffer when I am using Note pad. But once I
>> exit the database it is gone and I have to type the COLUMN and other commands
>> again. When I type the GET command to retrive I can only get the querry not
>> the ohter commands that I had typed like the colums etc... Pages 73.(Format
>> the Colums and other commands) Your help will be greatly appreciated.
>>
>> I am having the following problem. Whenever I make changes like add new
>> columns or edit colums I have to type it again and again. I cannot save it. I
>> can only save the Querry By using the Save command
>> SAVE C:\Report REPLACE
>> How should I save the colums and page size etc with the querry for future
>> use. If I save it in the buffer it is only temporary but if I want to make
>> chages after aday or two I have to retype the columns and other formating
>> commands again and again. How to save it for future?
>>
>> Please explain by using the following example. Say the file name is Report
>>
>> COLUMN employee_name HEADING 'Employee Name'
>> COLUMN project_name HEADING 'Project Name
>> COlumn SUM(PH.Hours_LOGGED) HEADING 'Hours'
>> COLUMN SUM(PH>DOLLARS_CHARGED)HEADING 'Dollars/Charged
>> SELECT E.EMPLOYEE_NAME,
>> P.PROJECT_NAME,
>> SUM(PH.HOURS_LOGGED)hours_logged,
>> SUM(PH.DOLLARS_CHARGED)dollars_charged
>> FROM EMPLOYEE E,
>> PROJECT P,
>> PROJECT_HOURS PH
>> WHERE E.EMPLOYEE_ID = PH.EMPLOYEE_ID
>> AND P.PROJECT_ID = PH.PROJECT_ID
>> GROUP BY E.EMPLOYEE_ID, E.EMPLOYEE_NAME,
>> P.PROJECT_ID, P.PROJECT_NAME
>>
>>
>> Thank you for your time
>> Please e-mail me your answer to
>> E-mail : mschalla_at_aol.com
>>
>>
>>
>>
Received on Sun Jul 22 2001 - 19:01:49 CEST

Original text of this message