Hi Tarbat!
I am using this script for my todays logs. I have now some questions, hopefully you can answer this:
- I want to export all logs ever registeterd. What must I write into the sql.txt? Now there stands for 2011:
WHERE
substr(Flights.EndTime,1,4)="2011"
- I am only interested in this topics of the Database for export: Reg, Airline, Aircraft, End Altitude, Flight Ended.
How can I export this? My complete sql.txt is this one:
.output radarbox-log.htm
.mode list
.header OFF
SELECT DISTINCT "<html><head><title>Radarbox Report today</title><body><link rel=stylesheet href=stylesheet-table.css type=text/css \><script src=sorttable.js></script><table class=sortable>" AS FIELD_1 FROM Aircraft;
.mode html
.header ON
SELECT DISTINCT
Aircraft.Registration AS "Reg",
Flights.Callsign AS "Flight ID",
Flights.Route AS "Route",
Aircraft.AircraftTypeSmall AS "ICAO Type",
Aircraft.Airline AS "Airline",
Aircraft.AircraftTypeLong AS "Aircraft",
Flights.StartAltitude AS "Start Altitude",
Flights.EndAltitude AS "End Altitude",
substr(Flights.EndTime,1,16) AS "Flight Ended"
FROM
Aircraft
LEFT OUTER JOIN Flights ON (Aircraft.ModeS=Flights.ModeS)
WHERE
substr(Flights.EndTime,1,4)="2011"
ORDER BY
Aircraft.Registration,
Flights.EndTime,
Aircraft.ModeS;
.mode list
.header OFF
SELECT DISTINCT "</table></body></html>" AS FIELD_1 FROM Aircraft;
.exit
- Is it possible to export these data (Reg, Airline, Aircraft, End Altitude, Flight Ended) direct to csv?