SQL*Plus User's Guide and Reference
Release 8.1.5

A66736-01

Library

Product

Contents

Index

Prev Up Next

Command Reference, 25 of 52


GET

Purpose

Loads a host operating system file into the SQL buffer.

Syntax

GET file_name[.ext] [LIS[T]|NOL[IST]]

Terms and Clauses

Refer to the following list for a description of each term or clause:

file_name[.ext]

      Represents the file you wish to load (typically a command file).

LIS[T]

      Lists the contents of the file.

NOL[IST]

      Suppresses the listing.

Usage Note

If you do not specify a file extension, SQL*Plus assumes the default command-file extension (normally SQL). For information on changing the default extension, see the SUFFIX variable of the SET command in this chapter.

If part of the filename you are specifying contains the word list or the word file, you need to put the name in double quotes.

SQL*Plus searches for the file in the current working directory.

The operating system file should contain a single SQL statement or PL/SQL block. The statement should not be terminated with a semicolon.

If a SQL*Plus command or more than one SQL statement or PL/SQL block is loaded into the SQL buffer from an operating system file, an error occurs when the RUN or slash (/) command is used to execute the buffer.

The GET command can be used to load files created with the SAVE command. See the SAVE command in this chapter for more information.

Example

To load a file called YEARENDRPT with the extension SQL into the buffer, enter

SQL> GET YEARENDRPT


Prev Up Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index