Computing.Net > Forums > Database > help! blank lines (break, compute)

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

help! blank lines (break, compute)

Reply to Message Icon

Name: aparente001
Date: February 24, 2009 at 19:53:14 Pacific
OS: unix
Subcategory: Non-specific SQL code
Comment:

Hi, I'm getting two mysterious blank lines after the first line of each group. I am attaching and appending the code and the output. See
http://academ.hvcc.edu/~m-stein/q4.sql
and
http://academ.hvcc.edu/~m-stein/out4
Thanks.

-- purpose: Create a list of all aircraft, showing the manufacturer,
-- model name, aircraft number, and charters trips flown
-- (destination, miles flown, and revenue generated). In
-- addition, generate totals of revenue generated and miles
-- flown for each aircraft.

COLUMN make -
FORMAT A10 -
HEADING 'Make'
COLUMN modl -
FORMAT A18 -
HEADING 'Model'
COLUMN ac_number -
FORMAT A6 -
HEADING 'plane#'
COLUMN destination -
FORMAT A7 -
HEADING 'airport'
COLUMN char_distance -
FORMAT 99999 -
HEADING 'distance'
COLUMN revenue -
FORMAT $99999.99 -
HEADING 'revenue'

BREAK ON make skip 1 ON modl skip 1 ON ac_number skip 1
COMPUTE SUM OF revenue ON ac_number
COMPUTE SUM OF char_distance ON ac_number

SET PAGESIZE 54
SPOOL out4

SELECT m.mod_manufacturer AS make, m.mod_name AS modl, a.ac_number,
char_trip, ch.destination, ch.char_distance,
1.35 * m.mod_chg_mile * ch.char_distance AS revenue
FROM hartmar.aircraft a
LEFT JOIN hartmar.charter ch ON a.ac_number = ch.ac_number
LEFT JOIN hartmar.model m ON a.mod_code = m.mod_code
ORDER BY make, modl, ac_number;

CLEAR COLUMNS BREAKS COMPUTES
SPOOL OFF

Make Model plane# CHAR_TRIP airport distance revenue
------ ----------
Beechcraft KingAir 2289L 10025 ATL 936 $3285.36


10029 ATL 1023 $3590.73
10055 GNV 1645 $5773.95
10049 GNV 1574 $5524.74
10031 GNV 1574 $5524.74
10022 GNV 1574 $5524.74
10014 GNV 1574 $5524.74
10041 ATL 936 $3285.36
10037 GNV 1645 $5773.95
10045 ATL 1023 $3590.73
****** -------- ----------
sum 13504 $47399.04

Cessna Citation Mustang 1234C


****** -------- ----------
sum


Citation Sovereign 2345C


****** -------- ----------
sum

Piper Axtec 1484P 10023 STL 508 $1303.02


10013 TYS 644 $1651.86
10004 STL 508 $1303.02
10051 BNA 352 $902.88
10048 TYS 644 $1651.86
10044 STL 472 $1210.68
10039 STL 508 $1303.02
10033 BNA 352 $902.88
10028 STL 472 $1210.68
****** -------- ----------
sum 4460 $11439.90


Navajo Chieftain 2278V 10034 MOB 884 $2804.49


10052 MOB 884 $2804.49

Make Model plane# CHAR_TRIP airport distance revenue
------ ----------
Piper Navajo Chieftain 2278V 10056 MQY 312 $989.82


10047 GNV 1574 $4993.52
10012 GNV 1574 $4993.52
10007 BNA 320 $1015.20
10042 BNA 320 $1015.20
10038 MQY 312 $989.82
10026 BNA 320 $1015.20
****** -------- ----------
sum 6500 $20621.25

4278Y 10032 ATL 998 $3166.16
10053 TYS 646 $2049.44
10019 ATL 936 $2969.46
10030 STL 472 $1497.42
10046 STL 472 $1497.42
10024 TYS 644 $2043.09
10027 GNV 1574 $4993.52
10008 GNV 1574 $4993.52
10015 ATL 998 $3166.16
10040 TYS 644 $2043.09
10054 ATL 936 $2969.46
10003 TYS 644 $2043.09
10018 TYS 646 $2049.44
10036 ATL 936 $2969.46
10035 TYS 646 $2049.44
10050 ATL 998 $3166.16
10043 GNV 1574 $4993.52
****** -------- ----------
sum 15338 $48659.81


47 rows selected.



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Database Forum Home


Sponsored links

Ads by Google


Results for: help! blank lines (break, compute)

Line break at position 512 in text www.computing.net/answers/dbase/line-break-at-position-512-in-text-/415.html

Run-Time error '3141' www.computing.net/answers/dbase/runtime-error-3141/252.html

Help making office map of computers www.computing.net/answers/dbase/help-making-office-map-of-computers/694.html