Grain:
TYPE_REFERENCES — one row per valid code value, keyed on ENTITY + PROPERTY + VALUE.TYPE_REFERENCES is the decode key — it maps each code to its display label.
Decode pattern
ENTITY, PROPERTY, and VALUE (cast to VARCHAR) — to decode any numeric code field. Always use a LEFT JOIN to retain rows where the code is null or not yet in the reference table. See Query overview for more examples.
Most commonly needed lookups
Gift — GiftType
The payment method recorded on the gift transaction.Gift — TributeType
RecurringGift — Status
RecurringGift — Frequency
Pledge — Status
Pledge — Frequency
Task — TaskStatus
GiftAskStatus — GiftAskStatusType
Contact — BaseContactType
All entities in TYPE_REFERENCES
Run this query to pull all current lookup values from your environment:Contact, ContactActivity, ContactAddress, ContactMethod, ContactWealth, CustomField, CustomFieldGroup, Email, Gift, GiftAskStatus, Membership, Pledge, PlannedGift, RecurringGift, Segment, SentEmail, SentEmailEvent, Task, Tribute.