-
Notifications
You must be signed in to change notification settings - Fork 1
Select ... From ... Where ...
The Select ... From ... Where ... DML statement is used to select records from a table/view that meet the condition defined in the Where Clause.
In the GeoDMS first a new domain unit needs to be configured with the e.g. the subset function, resulting in a subitem called Nr_OrgEntity with as values unit the index numbers of the original domain. This Nr_OrgEntity attribute can be used to get the data from the original domain for the new subset domain, using the lookup function (see examples).
Assume the following SQL Statement:
Select Street, Number, Zipcode, Town ** From ** Appartment ** Where ** Town = 'BTown'`
This statement can be applied on our Relational model versus Semantic arrays, resulting in the following data:
File:Relation select from where1.png
GeoDMS configuration (the Appartment domain unit is configured in a src container):
unit singleAttSelection := subset(src/Appartment/Town == 'BTown')
{
attribute Street := src/Appartment/Street[Nr_OrgEntity];
attribute Number := src/Appartment/Number[Nr_OrgEntity];
attribute ZipCode := src/Appartment/ZipCode[Nr_OrgEntity];
attribute Town := src/Appartment/Town[Nr_OrgEntity];
}
Assume the following SQL Statement:
Select Street, Number, Zipcode, Town From Appartment Where ZipCode = 'AA6681' And Number = 3
This statement can be applied on our relation model, resulting in the following data:
link=Special:FilePath/Relation_select_from_where2.png
GeoDMS configuration (the Appartment domain unit is configured in a src container):
unit multipleAttSelection := subset(src/Appartment/ZipCode == 'AA6681' && src/Appartment/Number == 3)
{
attribute Street := src/Appartment/Street[Nr_OrgEntity];
attribute Number := src/Appartment/Number[Nr_OrgEntity];
attribute ZipCode := src/Appartment/ZipCode[Nr_OrgEntity];
attribute Town := src/Appartment/Town[Nr_OrgEntity];
}
GeoDMS ©Object Vision BV. Source code distributed under GNU GPL-3. Documentation distributed under CC BY-SA 4.0.