PC SOFT

WINDEV的在线文档

  • Overview
  • How to proceed?
  • Adding a join into the current Select query
  • Deleting a join from the current Select query
  • Reinitializing the joins of the query
  • Limitations and notes
  • Specific joins
  • SQL Server syntax for joins
  • Advanced parameters
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

Joins between the files of a Select query

Overview
When several files are used in a query, WinDev/WebDev automatically searches for the links described in the analysis between these files. These links are called joins in the query editor.

For example, the following query selects the order numbers of the orders placed by the customers who live in Paris. The ORDERS file and the CUSTOMER file are joined by the CustomerNum item. The join between these files is automatically defined by the query editor.

Note: The links between the files appear in the graphic representation of the query only if the two linked files are used by the query.

By default, the joins are automatically created by the query editor. However, these joins may not correspond to the requested result. Therefore, you have the ability to add or delete joins. These operations are described in the following paragraphs.

How to proceed?

Adding a join into the current Select query

To add a join into the current Select query:
  1. Select "Edit the join" from the popup menu of the join (right mouse click). The description window of the query joins is displayed.
  2. Click the "Add" button. A window allowing you to define a new join is displayed.
  3. Specify the characteristics of the join to add.
  4. Validate. The join is automatically added into the query.
This allows you to create multiple joins between two files.

Note: To display the description window of the joins from the description window of the query:
  • Click the "Advanced" button.
  • Display the "Joins" tab.
  • Click the "Edit the joins" button. The description window of the joins is displayed.

Deleting a join from the current Select query

To delete a join from the current Select query:
  1. Select "Edit the join" from the popup menu of the join (right mouse click). The description window of the query joins is displayed.
  2. Select the join to delete.
  3. Click the "Delete" button. The join is automatically deleted. The joins between the files are automatically optimized in order for the query to operate properly.

Reinitializing the joins of the query

Reinitializing the joins is used to delete all the modifications made to the joins since the query was created. The query editor automatically re-creates optimized joins.

To reinitialize the joins of the current query:

  1. Select "Edit the join" from the popup menu of the join (right mouse click). The description window of the query joins is displayed.
  2. Click the "Reinitialize" button. The joins that were manually created are deleted.

Limitations and notes

Specific joins

The joins such as (A join B on x=y) join C on y=z are not supported.

To run queries with such joins, you must use H执行查询 or H执行SQL查询 associated with the h查询.无修正 constant.

WinDevWindows本地访问

SQL Server syntax for joins

The SQL syntax for joins is supported (when editing a SQL query and when running it). To run these queries, you have the ability to use H执行查询 or H执行SQL查询.

Advanced parameters

By default, the joins use the ISO syntax (INNER JOIN / LEFT OUTER JOIN / RIGHT OUTER JOIN / FULL JOIN). You also have the ability to use the Oracle syntax of joins. However, this syntax compatible with Oracle 7 is not recommended.

To use the Oracle syntax:

  1. Display the description window of the query.
  2. Click the "Advanced" button.
  3. In the "Joins" tab, select the requested type of syntax.
另见