I want to make a query involving RDB $ Character_Sets , RDB $ Collations and RDB $ Fields to get a list of "Fields" with their RDB $ Character_Set_Name and RDB $ Collation_Name .
SQL statement used:
select distinct
Fields .RDB$Field_Name ,
CharSets .RDB$Character_Set_Name,
Collations.RDB$Collation_Name
from
RDB$Character_Sets as CharSets ,
RDB$Collations as Collations,
RDB$Fields as Fields
where
CharSets .RDB$Character_Set_Id = Collations.RDB$Character_Set_Id and
Fields .RDB$Character_Set_Id = CharSets .RDB$Character_Set_Id
order by
Fields .RDB$Field_Name
Result obtained:
RDB$Field_Name RDB$Character_Set_Name RDB$Collation_Name
-------------- ---------------------- ------------------
RDB$10 UTF8 UCS_BASIC
RDB$10 UTF8 UNICODE
RDB$10 UTF8 UNICODE_CI
RDB$10 UTF8 UNICODE_CI_AI
... ... ...
That is, you have one row for each RDB $ Collation_Name. How to make each RDB $ Character_Set_Name, have the corresponding RDB $ Collation_Name and only it, reducing to a single line for each RDB $ Field_Name? Thankful.