Example of an Export Task

Previous Next

See Also

Suppose that the Travel Agency wishes to export details of Scheduled Tours for which no reservations have been made, so that this information can be used by management in an external application.

The SQL statement for this would be as follows:

SELECT

       schedtour_id,

       destination,

       tour_type,

       start_date,

       return_date,

       price,

       max_part,

       guide

FROM    schedtour st

WHERE NOT EXISTS

(

   SELECT  ' '

   FROM    reservation r

   WHERE   r.schedtour_id = st.schedtour_id

)

If the file format chosen was FIXED, the resulting output file, if opened with WordPad, might look something like this.

105

EUROPE

GRAND TOUR

13-06-2007

10-07-2007

104

EUROPE

GRAND TOUR

23-04-2006

20-05-2006

103

PARAGUAY

LATIN SPECIAL

14-01-2006

23-01-2006

102

INDONESIA

BALI BRUNCH

13-03-2007

24-03-2007

101

INDONESIA

BALI BRUNCH

16-12-2006

27-12-2006

 

This file can, of course, then be read into an appropriate application. In fact, an action task could be used at the end of the job to start the application and read the file automatically.