Show TOC

Procedure documentationCreating Simple Queries Locate this document in the navigation structure

 

Query Generator is an SAP Business One tool that enables you to create queries using the SQL query engine.

Note Note

This tool is designed for data retrieval only. Do not use it for any kind of updates.

End of the note.

Procedure

  1. From the Tools menu, choose   Queries   Query Generator  . The Query Generator window appears.

  2. To enable inserting conditions and variables into the query, choose the Conditions button. An additional section of the window opens.

  3. The cursor is automatically located where table selection takes place. Press Tab to open the Choose from List window, which displays all tables in SAP Business One.

  4. Double-click a table to insert it into the Tables zone.

  5. Repeat the previous step to select additional tables, if needed.

  6. To select fields:

    1. Highlight the relevant table. The fields in this table are now listed in the table area.

    2. Double-click the required fields to display them in the Select area.

  7. To apply conditions or use any variables in the query:

    1. Place the cursor in the Where area.

    2. Double-click the field on which you want to apply a condition. The selected field is displayed in the Where area.

    3. Choose the required condition from the Conditions list, and complete it by specifying the conditioned value. This can be a constant value (number, text), another field, or a variable.

  8. To generate the report, choose Execute. Once the results are displayed, you can save the query.

  9. Choose Close to close the Query Generator window.