The simplest SQL statement to return event information from the Ungerboeck Database is:
SELECT *
FROM EV200_EVENT_MASTER
WHERE EV200_EVT_DESIGNATION = 'X'
This will return information for all events in the database, however this is usually not what you want. Typically you want to filter these results to return events that match specific criteria.
It is always recommended that the first field to filter on is your organization code:
SELECT *
FROM EV200_EVENT_MASTER
WHERE EV200_EVT_DESIGNATION = 'X'
AND EV200_ORG_CODE = '10'
Then you may want to filter based on the event status:
SELECT *
FROM EV200_EVENT_MASTER
WHERE EV200_EVT_DESIGNATION = 'X'
AND EV200_ORG_CODE = '10'
AND EV200_EVT_STATUS = '30'
You will notice that the event status value is actually the event status code (within Ungerboeck this is typically displayed in parentheses after the event status description). You will also notice that this is a string rather than a number, as this is the way that event status codes are stored in the database.
Some other common fields to filter on are:
Start Date | EV200_EVT_START_DATE | |
End Date | EV200_EVT_END_DATE | |
Event ID | EV200_EVT_ID | |
Event Description | EV200_EVT_DESC | |
Event Search | EV200_EVT_SEARCH | |
Event Rank | EV200_EVT_RANK | |
Event Category | EV200_EVT_CATEGORY | |
Event Class | EV200_EVT_CLASS | |
Event Type | EV200_EVT_TYPE |
You can also combine these to create complex filter criteria to return a specific subset of events.
For a full list of fields available within the Event Master table (EV200_EVENT_MASTER) in the Ungerboeck Database, please refer to the Ungerboeck Data Model.
Comments
0 comments
Please sign in to leave a comment.