The following example declares a table of department codes and specifies a query header for the translations of the table: DTR> DECLARE TABLE DEPT_TABLE DFN> QUERY_HEADER IS "Responsible"/"Department" DFN> CE : "Commercial Engineering" DFN> PE : "Plant Engineering" DFN> CS : "Customer Support" DFN> RD : "Research and Development" DFN> SD : "Sales Department" DFN> ELSE "UNKNOWN DEPARTMENT" DFN> END_TABLE DTR> DTR> print "John belongs to " | ( "RD" via DEPT_TABLE ) ; John belongs to Research and Development The following example declares a table with a translation for each possible rig and includes an edit string in the definition that displays the translation in a 10 character wide column: DTR> DECLARE TABLE RIGGING DFN> EDIT_STRING IS T(10) DFN> QUERY_HEADER "TYPE OF"/"RIGGING" DFN> SLOOP : "ONE MAST" DFN> KETCH : "TWO MASTS, BIG ONE IN FRONT" DFN> YAWL : "SIMILAR TO KETCH" DFN> MS : "SAILS AND A BIG MOTOR" DFN> ELSE "SOMETHING ELSE" DFN> END_TABLE DTR> PRINT "KETCH" VIA RIGGING TYPE OF RIGGING TWO MASTS, BIG ONE IN FRONT DTR> The following example shows how to declare a domain table that returns the price of a yacht when you enter a value for LENGTH_ OVER_ALL. The example specifies a query header and an edit string for the translation field: DTR> DECLARE TABLE LOA_PRICE_TABLE DFN> FROM CDD$TOP.DTR$LIB.DEMO.YACHTS DFN> QUERY_HEADER IS "SAMPLE"/"PRICE" DFN> EDIT_STRING IS $$$,$$$ DFN> USING LOA : PRICE DFN> ELSE "NO BOATS IN STOCK WITH THAT LOA." DFN> END_TABLE DTR> PRINT 26 VIA LOA_PRICE_TABLE SAMPLE PRICE $17,900 DTR>