Home | Previous Page | Next Page   The Query-language Option > Redirecting Query Results >

Sending Output to a File

You can write query results to a new file or append the results to an existing file. If you do not specify a path when DB–Access prompts you for a filename, the file will be stored in the directory that you were in when you invoked DB–Access.

The New-file Option

To create a new file to store query results, select the New-file option on the OUTPUT menu. The OUTPUT NEW-FILE screen appears, as Figure 16 shows.

Figure 16. The OUTPUT NEW-FILE Screen
OUTPUT NEW-FILE >>   
Enter the name you want to assign to the new file, then press Return.

---------------- mystores@dbserver1 ----------- Press CTRL-W for Help ------

SELECT * FROM customer

Type a name for the file and press RETURN. DB–Access forwards the results of the query to that file and displays a message that indicates how many rows were retrieved. The query results do not appear on the screen.

Warning:
If you enter the name of an existing file, this procedure overwrites the existing file with the query results.

The Append-file Option

To add your query results to the end of an existing file without replacing its contents, select the Append-file option on the OUTPUT menu. The OUTPUT APPEND-FILE screen appears, as Figure 17 shows.

Figure 17. The OUTPUT APPEND-FILE Screen
OUTPUT APPEND-FILE >>   
Enter the name of the file you want to append results to, then press Return.

---------------- mystores@dbserver1 ------------- Press CTRL-W for Help ------

SELECT * FROM customer

Type the name of an existing file where you want to append the query results and press RETURN. DB–Access appends the query results to the end of that file and displays a message that indicates how many rows were retrieved. The query results do not appear on the screen.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]