Skip to Content
avatar image
Former Member

Query Wizard

Hi There,

I have a question with the "Query Wizard" under "Reports".When i am navigating the wizard, after the selection of DB tables, i move onto the "Conditions and Relations" screen, Can somebody explain me how the "Display conditions" and "Display Relations" work.

Thanks in advance.

Raghu Tadimeti

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    May 23, 2004 at 08:02 AM

    Hi Raghu

    I've copied the relevant parts from our documentation:

    1. Display Conditions Tab

    Use this tab to define conditions upon which the required records will be derived from the selected tables. Using conditions is optional only and designated to derive data matching criteria defined by the user.

    Brackets columns ( ) – allow you to define the conditions priority sequence. Click these columns to select the desired bracket type.

    Table column (column #2) – click this column to select the table you would like to set conditions for.

    Field column – click this column to select the required field from the select table you would like to set conditions for.

    Condition column – click this column to open a drop down menu displaying a list of values: Equal, Greater than, Smaller than, Not equal, Contains etc.

    The terms IS NULL and IS NOT NULL are also displayed on the list. The meaning of the condition IS NULL is that the field on which we perform the condition is blank. The meaning of the condition IS NOT NULL is that the field on which we perform the condition contains a certain value i.e. in case no value was entered in the Customer/Supplier Ref. No. field in a marketing document, that field’s value is NULL.

    Table column (column #5) – click this column to select an additional table, allowing you to create a condition that combines 2 different tables (optional). You can always select the same table selected in column #2 in this column (in order to compare one field to another in the same table).

    Field/Value column – you may enter one of the following three in this column:

    A field from a table – will be enabled only if a table was entered in the Table column (column #5).

    A fixed value – any fixed data i.e. a string or a number.

    A variable – enter a variable using ‘?’.

    Or/And column – click this column to open a drop down menu containing 3 rows: a blank row, Or and And. This column is designated to derive data based on more than just a single condition. In order to delete a selected value (Or/And) select the blank row from the menu.

    To move on to a new row in order to create an additional condition use the Tab key or select Add Line from the Data menu.

    The following conditions were defined in the report we are creating:

    Display all the records that match the condition: the stock transaction reference date is found in the dates range defined by the user during the query execution. The date variable is displayed by the ‘?::?’ symbols. An additional condition is that the value in the InQty field (Incoming Quantity) is greater than 0. The purpose of using the second condition is to derive only stock entry transactions (without release transaction where the InQty=0).

    Selecting the value And between these two conditions will cause the display of records matching both conditions only.

    2. Display Relations Tab

    Select this tab if you want to define relations among the different tables involved in the query. The purpose of a relation definition is to enable the deriving and unification of data from 2 tables or more based on a certain link between them.

    Check the Execute box to define a relation.

    This check creates an additional conditioning, which means that in addition to match the conditions defined in the Define Conditions tab, the records will be derived only if they match an additional condition – the Item code in the OINM table exists in the OITM table.

    Checking the All box will automatically check the Execute box as well.

    Check the All box under the title To Table to display data from the left table as well (the OINM table in this example). This causes records from the OINM table to be displayed even if the Item code in that table does not exist in the OITM table.

    Check the All box under the title From Table to display data from the right table as well (the OITM table in this example). This causes records from the OINM table to be displayed whether the Item code in the OINM table exist in the OITM table or not. In addition, records from the OITM table will be displayed whether the Item code in the OITM table exist in the OINM table or not.

    Add comment
    10|10000 characters needed characters exceeded