I am trying to extract my logs in the proper cabrillo QSO: format for the IARU contest, using the following SQL statement:
SELECT 'QSO:', freq, 'PH', qsodate, time_on, 'AB1KW 59 08', call, remarks FROM cqrlog_main WHERE qsodate > '2010-07-10' ORDER BY qsodate,time_on
However, this results in the following error message:
SQL error:Duplicate name 'CONSTANT' in TFieldDefs
Would it be an idea to give each constant field a number (CONSTANT1, CONSTANT2, etc) so firebird does not error out?
Or is the fix in the firebird code itself?
On a related note, I wonder if cqrlog needs two exchange fields for a contest, so those can be automatically exported in contests where eg. a serial number is required.
Exporting of cabrillo QSO: lines could be achieved by storing appropriate SQL macros - no need to add programming for that.
Hi,
you can try it this way:
SELECT 'QSO:' || freq || 'PH' || qsodate || time_on || 'AB1KW 59 08' || call || remarks FROM cqrlog_main WHERE qsodate > '2009-07-10' ORDER BY qsodate,time_on
Of course, you must add spaces between fields, format numbers etc.
73 Petr, OK2CQR
--
http://HamQTH.com/ok2cqr
https://ok2cqr.com
That almost works! The only issue is I seem to be running into a maximum length of the SQL query now and it does not let me type in the "ORDER BY" once I add enough spaces to separate all the fields...
This is getting real close :)
Could you post here the SQL query? Thank you.
73 Petr, OK2CQR
--
http://HamQTH.com/ok2cqr
https://ok2cqr.com
SELECT 'QSO: ' || freq || ' PH ' || qsodate || ' ' || time_on || ' AB1KW 59 08 ' || call || ' ' || remarks FROM cqrlog_main WHERE qsodate > '2010-07-10'
I would have liked to add some more things into that query, for example an ORDERED BY, and two more clauses to WHERE to only get contest QSOs :)
However, it only allows me one additional "ORDERED" in the window, before it refuses to let me type additional text...
It is interesting. I can write anything and don't have any problem with length limit. Could you please send me a screeshot? Thank you.
73 Petr, OK2CQR
--
http://HamQTH.com/ok2cqr
https://ok2cqr.com
Interesting, sometimes 0.9.3 refuses to let me write, but by moving the cursor back to before the last letter, I can write as much as I want and simply delete the last letter...
I guess this bug is fixed, and/or just something strange going on here locally.