Filtering the Log Page Display with Structured Query Language (SQL)
Invoking SQL Query Filters from the Main window's Filter panel
DXKeeper provides the ability to control which subset of your logged QSOs appear in the Log Page Display; this capability is referred to as filtering, and is entirely non-destructive; at any time, all filtering can quickly be removed.
Controls in the Filter panel, located at the bottom of the Main window's Log QSOs tab, enable you to quickly filter by callsign, DXCC entity, date, selection, LoTW status, and the presence of errors; this panel includes a textbox that can be used to specify a callsign, DXCC prefix, date, etc.
Panels on the Advanced Logs Sorts, Filter, and Modifiers window provide the ability to quickly filter by date range, band, mode, or contest.
For complete control over the subset of your logged QSOs appear in the Log Page Display, you can filter by specifying a Structured Query Language (SQL) expression - either using the Filter panel textbox, or using the Advanced Logs Sorts, Filter, and Modifiers window's SQL Query Filters. This SQL expression, for example, will populate the Log Page Display with all RTTY QSOs made with North Korea during the year 2002:
(DXCCPREFIX = 'P5') and (MODE='RTTY') and (YEAR(QSO_BEGIN) = 2002)
Many operations -- log reporting, award progress reporting, QSLing and Exporting
-- act only upon QSOs appearing in the Log Page Display, so you can use
filtering to limit these operations to a specific subset of the QSOs in your log. For
example, you could produce a single-band WPX progress report, or export only
those QSOs made during last year's ARRL DX contest. Filtering can also be used
to quickly see all previous QSOs with a station you're about to work, or all
QSOs made during a specified day.
At startup, the Log Page Display Filter is cleared, so the Filter panel's caption is Filter: None; thus the Log Page Display contains entries for every QSO in the current log file. If you activate a Log Page Display filter, it will be shown in the Filter panel's caption, e.g.
Filter: Call=7O1DX
Filter: QSL begin between 7/26/2008 00:00 and 7/27/2008 00:00
Filter: (Mode = 'RTTY') and (Band = '160m') and (QSL_RCVD = 'Y')
The Filter panel displays a textbox and a bank of 9 filter buttons:
Button | Function |
X |
|
Call |
|
DXCC |
|
Need |
|
Date |
|
Since |
|
Sel | |
LotW |
|
Broke |
|
~ |
|
To clear the Log Page Display filter so that all QSOs are visible
, click the Filter panel's X button. Depressing the CTRL
key while clicking the Filter panel's X button both clears the Log
Page Display filter and sorts the Log Page Display in
ascending order of .QSO Begin date-and-time.
If you type a callsign into the Filter textbox and click the Filter panel's Call button, the Log Page Display hides entries for any QSOs whose call item does not match the Filter callsign. Similarly, entering a callsign into the Filter textbox and clicking the Filter panel's DXCC button removes entries for any QSOs whose DXCC entity does not match that of the Filter callsign. If the contents of the Filter textbox cannot be mapped to a DXCC Entity, then it is assumed that these contents are DXCC Prefix rather than a callsign, and the Log Page Display is filtered by this DXCC Prefix. For example.
Filter textbox contents | Clicking the Filter panel's DXCC button filters for all QSOs with |
3B8IK | Mauritius Island (DXCC = 3B8) |
UN1DX | Kazakhstan (DXCC = UN) |
UL1DX | Uzbekistan (DXCC = UJ) |
Y | German Democratic Republic (DXCC = Y) |
You can use *
(asterisk) as a wildcard character in Filter callsigns.
For example,
K6MI*
will match K6MI, K6MIO, and K6MIO/KH6.
When you invoke the Call filter on a callsign that doesn't contain a wildcard character, DXKeeper automatically uses a search expression that will match prepended or appended prefixes or designators. For example
K6AB
will match K6AB,
KH6/K6AB, K6AB/QRP,
and KH6/K6AB/P
but will not match K6ABC
or ZK6AB.
If you type a callsign or callsign fragment into the Filter textbox and click the Filter panel's DXCC button, DXKeeper will determine the DXCC entity associated with the callsign or callsign fragment, and filter the Log Page Display to show all QSOs with this DXCC entity.
Depressing the CTRL key while clicking the Filter panel's DXCC button displays only QSOs whose DXCC entity prefix matches the DXCC entity prefix specified in the Filter panel textbox
To use the DXCC button to locate QSOs with a deleted DXCC entity, type the deleted entity's DXCC prefix into the Filter textbox preceded by the ~ character. To locate QSOs with Serrana Bank, for example, type ~HK0S into the Filter textbox and click the DXCC button.
Both the Call and DXCC filters select the
appropriate DXCC entity in the Progress Grid and
provide detailed award
status in the Progress Details Grid.
Clicking the Filter panel's Need button displays only QSOs in the Log Page Display whose Needed items are set to Y.
Depressing the Alt key while clicking the Filter panel's Need button sets the Needed item to N in each QSO in the Log Page Display.
Note that logging a new QSO, marking a QSO as confirmed, importing QSOs, or deleting QSOs have no effect on the Needed items of any logged QSOs. The Need filters and Needed item provide a toolset for identifying specific sets of currently-needed QSOs - for example, all currently-needed QSOs made during the year 2020. To ensure that Needed items are up-to-date, depressing the CTRL key while clicking the Need button should always be the first step in such an exercise.
The Date filter limits the Log Page Display to QSOs that began during the interval specified in the Filter panel's textbox. Date-and-time parameters can be specified using any of these formats:
your locale's standard date or date-and-time formats, as specified in the Windows Control Panel's Regional and Language Options settings
dd-mmm-yyyy hh:mm:ss
yyyy-mm-dd hh:mm:ss
If in the Filter panel's textbox you specify
a day, e.g. 2008-01-25, then only QSOs that started during that day will be displayed
a day and time, then the interval depends on the specified hour, minute, and second:
Clicking the Filter panel's Since button limits the Log Page Display to QSOs that began any time after the date or date and time specified in the Filter panel's textbox. Depressing the CTRL key while clicking the Since button limits the Log Page Display to QSOs that began any time after the date and time at which the Since filter was last invoked.
Depressing the CTRL key while clicking the Filter panel's Date button updates and then invokes the Advanced Logs Sorts, Filter, and Modifiers window's UTC filter, which allows you to restrict the Log Page Display to those QSOs starting within a range specified in one of two ways:
within a specified number of minutes of a specified date-and-time (useful for locating QSOs for which the callsign may have been incorrectly logged), or
after one specified date-and-time and before another specified date- and-time; if an after/before range is selected but not before date-and-time is specified when the UTC filter is invoked, the current date-and-time is used for this parameter.
If the Advanced Logs Sorts, Filter, and Modifiers
window's UTC
panel specifies a within range, then typing a valid date-and-time in
the Filter panel textbox and then clicking the Filter panel's Date
button while depressing the CTRL key will set the center of the range to
that date-and-time and activate the UTC filter. If the Advanced Logs Sorts, Filter, and Modifiers
window's UTC panel specifies an after/before range, then typing
a valid date-and-time in the Filter panel textbox and then
clicking the Filter panel's Date button while depressing the CTRL
key will set the beginning of the range to that date-and-time and activate the UTC
filter.
Clicking the Filter panel's Sel button displays all QSOs whose Select items are set to Y. Every QSO's Select item can be manually set to N or Y, so this provides a means of specifying and selecting an arbitrary group of QSOs. You can also configure DXKeeper to set the Select item of each imported QSO to Y; with this option enabled and the Select items of all logged QSOs were set to N before the import operation, the Sel filter will show only newly-imported QSOs after the import operation completes.
To set the Select item of
all QSOs in the Log Page Display to N, depress the CTRL key while
clicking the Sel button. Note that this only affects QSOs in the Log Page
Display; to set the Select item of all QSOs in
the current log to N, either reset
the Log Page Display filter before invoking CTRL-Sel, or click the Set
all Select to N button on the Main window's Import QSOs
tab.
Clicking the LotW button displays all QSOs whose LotW Sent items are set to U, meaning that their acceptance by LotW has not been verified.
If the LotW database is present in DXView's Databases folder or in DXKeeper's Databases folder,
Depressing the Alt key while clicking the LotW button filters the Log Page Display to show all QSOs not confirmed via LotW with stations that have subsequently uploaded to LotW and whose confirmation would advance award progress towards the DXCC/IOTA/VUCC/WAS/WAZ/WPX awards; the Select item of each such QSO is set to Y. QSOs with stations whose LotW Sent items are set to X are ignored.
Clicking the Broke button filters the Log Page Display to display only QSOs that
are missing required information:
Band
Begin date/time
Callsign
Country code
DXCC prefix
Mode
Operator
have a Begin date/time prior to 1/1/1930
have an End date/time that occurs before their Begin date/time
do not contain a valid callsign
specify a Satellite name but do not specify a Propagation Mode of SAT
specify a Propagation Mode of SAT, but do not specify a Satellite name
have an empty myQTH field in a Log for which multiple QTHs have been defined
If the Subdivision validity checking box is checked in the Other Awards panel on the Config window's Awards tab, the Broke filter also displays QSOs that
have PrimaryInvalid set to Y, which means that the specified Primary Administrative Subdivision code or abbreviation is not formally defined by the QSO's DXCC entity
have SecondaryInvalid
set to Y, which means that the specified Secondary
Administrative Subdivision code or abbreviation is not formally
defined by the QSO's DXCC entity and Primary Administrative Subdivision
You can filter the Log Page Display
to show only QSOs made from the currently-selected
QTH.
SQL lets you limit the display of logged QSOs to an subset described by a logical expression that references items in each QSO, for example
(CALL='VK9NS') AND (QSO_Begin > #1997-06-01 12:00#)
SQL filtering can be accomplished via the Filter panel at the bottom of the Main window's Log QSOs tab, or via the Advanced Sorts, Filters, and Modifiers window's SQL Query Filters panel. Though assembling an SQL filter requires more effort than invoking one of the pre-fabricated filters described above, doing so provides complete control over the subset of QSOs present in the Log Page Display.
DXKeeper's Advanced Logs Sorts, Filter, and Modifiers window, which appears when you click the Adv button located above the Log Page Display on the Main window's Log QSOs tab or when you click the Advanced button at the bottom of the Main window's Check Progress tab, enables you to
specify a within or after/before date-and-time range, and click the UTC Filter panel's Filter button to display only QSOs that began within that range; double-clicking a textbox in this panel will set its contents to the current date and time
specify one or more bands, and click the Band Filter panel's Filter button to display only QSOs made on the specified bands
specify one or more modes and click the Mode Filter panel's Filter button to display only QSOs made in the specified modes
specify a Contest ID and optionally a 4-digit year; if no Contest ID is specified, the Log Page Display will contain QSOs made in the specified year that specify any Contest ID
specify up to 16 SQL Query Filters in 4 banks of 4, and invoke them as filters
locate duplicate QSOs in the Log Page Display by clicking the Duplicates panel's Filter button, which
the range (in minutes) defines a duplicate QSO
0 means another QSO must exactly match the QSO's begin date/time to be considered a duplicate
a number larger than 0 specifies a range before and after the QSO's begin date/time; if another QSO's begin date/time falls in this range, the QSO will be considered a duplicate
if the Merge box is checked, information present in items of each duplicate QSO is placed into empty items in the original QSO that it duplicates
during this phase,
progress is shown in a Checking for duplicate QSOs panel to the left of the Duplicates panel
checking can be immediately terminated by clicking the Checking for duplicate QSOs panel's Abort button.
displays all QSOs whose Select item is set to Y
run a script file containing Filter, Retain Filter, Report, Sort, and Modify commands
set Select items to specified values; in the Set Select panel,
clicking the Set Select to N button in the All QSOs in Log subpanel will set the Select item to N in every QSO in the current log - independent of Log Page Display filtering
clicking the Set Select to button in the QSOs in Log Page Display subpanel will set the Select item to the chosen New value in every QSO in the Log Page Display
clicking the From Callsign File button in the QSOs in Log Page Display subpanel will display a Select Callsign File window with which the text file can be chosen
each line in the chosen text file should specify a callsign as its first (or only) word; delimiters are the space, comma, semicolon, vertical bar, and tab characters
Select items of QSOs in the Log Page Display with each callsign so specified will be set to Y
the Sel
button in the Filter panel on the Main
window's Log QSOs tab will filter the
Log Page Display
to contain all QSOs whose Select items
are set to Y
Depressing the Ctrl key while clicking the UTC, Band, Mode, or SQL panel's Filter buttons refines the existing Log Page Display filter by applying the new filter to those QSOs visible in the Log Page Display.
To save all 16 SQL Query Filters to a text file, click the Save button; to restore all SQL Query Filters from a text file, click the Restore button. These functions can be used as a backup mechanism before making significant changes to an SQL expression, or to maintain multiple sets of SQL filters optimized for different operating conditions.
SQL Query Filters can also be invoked from the Filter panel textbox on the Main window's Log QSOs tab. A bank of SQL Query filters is considered active if at least one caption is specified. Allowing the mouse cursor to hover over an SQL Query filter button for a few seconds will produce a popup window that displays the SQL expression associated with the filter. By clicking the ~ button in the Filter panel textbox, buttons for each filter in the next active bank of SQL Query filters will appear in the Filter panel textbox, each bearing its specified caption. If buttons for the last active bank of SQL Query filter are being displayed in the Filter panel textbox, then clicking the ~ button will display the Call, DXCC, Date, Since, Sel, LotW, and Broke filter buttons.
Depressing the CTRL key while clicking one of the Filter panel's SQL Query filter buttons will display the Advanced Logs Sorts, Filter, and Modifiers window, with the appropriate bank of SQL Query filters made visible.
If the Display panels in two columns option is enabled, the Call, DXCC, Date, Since, Sel, LotW, and Broke filter buttons will always be visible. Clicking the ~ button will toggle between displaying eight filter buttons for SQL Query Filter banks 1 and 2, and eight filter buttons for SQL Query Filter banks 3 and 4.
An SQL
expression typed directly into the Filter panel textbox can be used to
filter Log Page Display by striking Ctrl-S.
Clicking the ~ button in the Filter panel textbox displays buttons for each filter in the next active bank of SQL Query Filters in the Filter panel textbox and a Script button that when clicked prompts you to specify a script file for execution. If no bank of SQL Query Filters is active, clicking the ~ button will still display the first bank of SQL Query Filters and a Script button.
If the Display
panels in two columns option is enabled, the Script button will always
be visible.
Filters can also be invoked by striking control keys in the filter textbox.
To facilitate sequential filter operations, striking the Enter key with the cursor in the filter textbox invokes the last filter operation. For example to quickly check for previous QSOs with JY4NE, IK4VYX, and YV1DIG, one would
enter JY4NE in the filter textbox
click the Call button in the filter panel to see previous QSOs with Ali
enter IK4VYX in the filter text box and strike the Enter key to see previous QSOs with Fab
enter YV1DIG in the filter text box and strike the Enter key to see previous QSOs with Paul
Double-clicking an item's label in the Capture window will filter the Log Page Display to show all QSOs whose item matches the value in the Capture window. If the Capture window's IOTA item contains OC-005, for example, double-clicking the IOTA label will filter the Log Page Display to show all QSOs whose IOTA item is OC-005.
Depressing the ALT key while clicking the Log button will reset the Log Page Display filter; if the Sort panel is set to UTC, the most recent QSO will be made current.
DXKeeper's title bar shows the number of QSOs visible in the Log Page Display, taking any specified filtering into account.
QSL and Export
operations only apply to QSOs visible in the Log Page Display, thus you can use
filtering to choose a specific subset of QSOs to which these activities apply.
Double-clicking on a callsign in the Call field in the Main window's Log QSOs tab filters the Log Page Display to show previous QSOs with that callsign; if Contest-mode is checked, then only QSOs whose recorded Contest IDs match the current Contest ID setting are shown. Double-clicking on an entry in the Log Page Display filters the Log Page Display to show previous QSO's with that entry's callsign; if Contest-mode is checked, then only QSOs matching the current Contest ID are shown. Double-clicking on an entry in the Log Page Display while depressing the Ctrl key filters the Log Page Display to show all QSO's with that entry's DXCC entity. If Display previous comments on Lookup is checked, these operations will display a scrollable window containing comments extracted from previous QSOs with the same base callsign, each preceded by the QSO's start time and terminated by the QSO's callsign.