Database Reference
In-Depth Information
Figure 8.13
Executing Scripts
within Scripts.
8.3.1
Column Formatting and Headings
The syntax of the COLUMN command, which is used to adjust the width
and the heading of a column, is shown in Figure 8.14.
The CDREPORT script used previously in this chapter can be beauti-
fied for readability using COLUMN command settings. The columns seem
a little spread out, so let's change the format of the columns. I have added
some column commands to the query by editing the CDREPORT file
(EDIT CDREPORT) previously created, as shown in the following script.
Changes are highlighted.
DEFINE CDNUM=9
COLUMN CDTITLE FORMAT A15 WRAP
COLUMN NAME FORMAT A12 TRUNCATE HEADING "Artist Name"
COLUMN SONGTITLE HEADING "Song|Title" FORMAT A20 WORD_WRAP
SELECT M.TITLE CDTITLE , A.NAME, S.TITLE SONGTITLE
FROM MUSICCD M JOIN CDTRACK T ON (M.MUSICCD_ID=T.MUSICCD_ID)
JOIN SONG S ON (T.SONG_ID=S.SONG_ID)
Search WWH ::




Custom Search