Problem with SQL-Query

4 posts / 0 new
Last post
dl3sdn
Problem with SQL-Query

Good evening,
I have a problem with a SQL-Query. I want to count the worked DXCC beginning from 2013-01-01 up to today. While I was using a former version od cqrlog I used the following:
SELECT COUNT(DISTINCT dxcc_ref) FROM cqrlog_main WHERE (qsodate >= '2013-01-01') 
When I do it now while I'm using the version 1.5.4 I get an error
Unknown column 'dxcc_ref' in 'field list'
What's the problem?
Thanks for any help.
vy 73 de Helge. DL3SDN
 
 
 

ok2cqr
ok2cqr's picture
Re: Problem with SQL-Query

Hello Helge,
 
the database structure has been changed. Please use this:
 
SELECT COUNT(DISTINCT dxcc_ref) FROM view_cqrlog_main_by_qsodate WHERE (qsodate >= '2013-01-01')
 
Now the cqrlog_main table has adif filed instead of DXCC_REF. This adif filed is foreign key from dxcc_id table.
 
73 Petr, OK2CQR
 
 

dl3sdn
Thank you.

Thank you.
Where can see the database structure?
vy 73 de Helge, DL3SDN

ok2cqr
ok2cqr's picture
Re: Problem with SQL-Query

Hi Helge,
 
please look here: 
https://github.com/ok2cqr/cqrlog/blob/master/src/dData.lfm 
from line 82 and 630.
 
73 Petr