Loading an Inline table

There is yet another way of adding a table to a data model, and it's one that is especially useful for small tables that do not necessarily reside in a database, for example, those that contain a custom description of an entity. With an Inline table, the data is entered directly into the Edit Script window. The process to input an Inline table is outlined here.

From the Edit Script window, go to the Insert menu and select Load Statement | Load Inline. The Inline Data Wizard will appear as shown in the following screenshot:

Loading an Inline table

The window is similar to a spreadsheet, with rows and columns.

Note

To enter heading labels, double-click on the header cell.

We can start typing data into the cells, and after we are finished entering the content of the table, we can click on OK.

Note

Importing document data to the inline table

It is possible to enter, within the Inline wizard, a list of values contained in a field that is already stored in RAM. This is done via the Import Document Data wizard. To bring up this wizard, go to the Tools menu from the Inline Data wizard and select Document Data….

The resulting script for our input table would be similar to the following:

LOAD * INLINE [
  ID, Description
  1, One
  2, Two
  3, Three
  4, Four
  5, Five
  6, Six
  7, Seven
  8, Eight
  9, Nine
  10, Ten
];

The advantage of this approach is that you will not need to maintain a separate table (whether on a database or a table file) when dealing with a small table of this sort. Keep in mind that the values will be hardcoded in the script. Whenever you need to change them, it can only be changed in the script.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset