<?xml version="1.0" encoding="utf-8"?>
<LiteralDictionaryExternalQuery xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- [required] A unique key for the query. -->
<Key>CalendarDayForEarnCode</Key>
<!-- [required] A display name of the query. The name is shown in filters ComboBox. -->
<DisplayName>Calendar Day entries for a specific EarnCode</DisplayName>
<!-- [required] A name of a translation source table. Possible values: Text, Literal, LiteralDictionary. -->
<!-- LiteralDictionary queries will be shown on Dictionary Translations screen; Text and Literal queries - on Dictionary Links. -->
<TranslationSourceType>Text</TranslationSourceType>
<!-- [required] MsSql query.
Expected return columns:
- for TEXT table: EntityType, EntityName, TextID
- for LITERAL table: EntityType, EntityName, LiteralID
- for LITERAL_DICTIONARY table: LiteralDictionaryID
EntityName and EntityType will be displayed on the browser and are used to provide additional information about the row.
Queries can contain custom parameters (i.e. "@EarnCode"). Custom parameters will be specified in filters ComboBox on a screen. -->
<MsSqlQuery>
select
'Calendar Day' as EntityType,
C.Facility + ' / ' + CAST(CD.CalendarDay as nvarchar) as EntityName,
CD.TextID as TextID
from CALENDAR C
join CALENDAR_DAY CD on C.ID = CD.CalendarID
where CD.EarnCode = @EarnCode
</MsSqlQuery>
<!-- [required] Oracle query. -->
<OracleQuery>
select
'Calendar Day' as EntityType,
C.Facility || ' / ' || CAST(CD.CalendarDay as nvarchar2(10)) as EntityName,
CD.TextID as TextID
from CALENDAR C
join CALENDAR_DAY CD on C.ID = CD.CalendarID
where CD.EarnCode = @EarnCode
</OracleQuery>
</LiteralDictionaryExternalQuery>