Simplicty and flexibility!


Support::

Displaying Data From A Related Form


Parameters


Returns/Result


Examples


Reference

Displaying Data from a Related Form

Displaying Data from a Related Form

image\Dql_0003.gif

See DQL 8 for more information on the sorting and grouping operators.

 

The query so far reads:

 

 for MEMBERS

 with TOTALDUE > 90 ;

  list records

   LASTNAME in order ;

 

Relational Operators

We want DataEase to list the date of each member's most recent reservation. However, this information does not appear in the Columns list because reservation dates are not stored in the MEMBERS table. Instead, the DATE field is stored in the RESERVATIONS table.

Because a pre-defined relationship exists between the RESERVATIONS table and the Primary table (MEMBERS), we can use a relational operator to access any information we need from the RESERVATIONS table. DQL provides seven relational operators (any, all, count of, highest of, lowest of, mean of, and sum of) that let you retrieve information from a table related to the Primary table.

To tell DataEase to find the most recently dated reservation for each member, enter the highest of relational statistical operator into the script before specifying the column name. Press Enter to start a new line, then double-click highest of in the Operators pick list or type it directly into the script:

 

 for MEMBERS

 with TOTALDUE > 90 ;

  list records

   LASTNAME in order ;

   highest of

 

This tells DataEase to read all the records (related to the current record being processed) in the related table and report the highest value in the column among those records. After the relational operator highest of, we must specify the name of the relationship followed by the name of the column whose value we want to include.

Specify the RESERVATIONS table name by double-clicking it in the Tables list. DataEase enters the table name into the script and updates the Columns list to display the names of columns in the RESERVATIONS table.

 

image\dql3-10.gif

 

Specify the DATE column name by double-clicking it in the Columns list. DataEase enters it into the script. End the statement with a semicolon. The script now reads as follows:

 

 for MEMBERS

 with TOTALDUE > 90 ;

  list records

   LAST NAME in order ;

   highest of RESERVATIONS DATE ;

 

We want this procedure to list one more item: the membership fee paid by each member. This information is stored in the TOTAL DUE column in the MEMBERS table, so highlight MEMBERS in the Tables pick list. DataEase displays that table's column names in the Columns list.

Double-click TOTAL DUE in the Columns list to enter this item into the script, as shown:

 

 for MEMBERS

  with TOTALDUE > 90 ;

  list records

   LAST NAMEin order ;

   highest of RESERVATIONS DATE ;

   TOTAL DUE

See Also


On the forum about Displaying Data From A Related Form

[@EOF@]...

Product: . Written by alembagheri tahmas 07/12/13 at 13:37:32

Hi there,I am trying to use an external MySQL DB in dataease. I have successfully create the ODBC link and added the DB to dataease. I can also access the DB from dataease. Now, just for testing purposes, I am trying to create a simple report b...

Product: DataEase for Windows 7.x. Written by George Washington 11/04/14 at 08:26:17

no se pude exportar ahora archivos a pdf, ni a excel o otros cosa mala. en verdad creo que hace faltaen las versiones anteriores me funcionaba mas o menos bien. le hace falta a los aplicativos que se desarrollan en Dataeasegr...

Product: DataEase 8 Reporter. Written by eduardo paez 02/05/14 at 14:40:11

Thanks. Anyway I'm trying to use this fuction but it seems to me that it doesn't work on 8.2. I tried also in a DQL.There's something wrong?<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA9IAAAJ3CAYAAAB4NWk3AAAAAXNSR0IArs4...

Product: . Written by Marco Marchesi 15/02/16 at 14:50:46

[@EOF@]...

Product: Dataease [{8}]FIVE. Written by Chamil Rajindra 21/02/19 at 10:17:46

Thanks for the very good explanation!AS...

Product: . Written by afonso santos 28/10/19 at 00:50:14

I am pleased to see that the migration from Dos 4.53 is then sa 5.5 works. A really useful thing would be a compiler of SQL languages. Will you get there?Original Text:Mi compiaccio a vedere che la migrazione da Dos 4.53 è poi sa 5.5 funzio...

Product: . Written by Grossi Gioacchino 18/11/19 at 14:33:44

How can i delete a Style sheet?...

Product: Dataease [{8}]FIVE. Written by Rainer 22/03/21 at 11:13:10

I run W7 and since a few days&nbsp;Dataease 8.5 is not starting any more, do you have an idea? i installed it again but that did not help....

Product: Dataease [{8}]FIVE. Written by Rainer 08/06/21 at 14:12:40

[@EOF@]...

Product: . Written by Hiralal Rampul 01/12/21 at 17:47:10

On the blog about Displaying Data From A Related Form


dg3_HelpView