Icon COPY FILE

Copies the specified file to a new file name in the same store or in a different store.

Syntax
COPY FILE <FileName> IN STORE <StoreName>
TO <FileName> [IN STORE <StoreName>]

Usage
Use this statement to copy the specified file in the specified store to a new file in the same or a different store. The stores may be either local or remote, and copying from a local store to a remote store, or vice-versa, is permitted. Both stores must have already been created using the CREATE STORE statement.

Examples
-- This example copies an update file
-- from a local store called OutUpdates to
-- a remote store called RemoteUpdates

COPY FILE "AccountingDB-Updates-2007-03-12.EDBUpd" IN STORE "OutUpdates"
TO "AccountingDB-Updates-2007-03-12.EDBUpd" IN STORE "RemoteUpdates"

Required Privileges
The current user must be granted the SELECT privilege on the store from which the file is being copied, and the CREATE privilege on the store where the new file will be created. Please see the User Security topic for more information.

SQL 2003 Standard Deviations
This statement deviates from the SQL 2003 standard in the following ways:

DeviationDetails
ExtensionThis SQL statement is an ElevateDB extension.
Image