AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Editores / Editor de consultas / SQL
  • Overview
  • How to?
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Otros
Procedimientos almacenados
Multi-database queries
ODBCOLE DBNo disponible con estos tipos de conexión
Overview
A query (typed in SQL code) can operate on different databases: HFSQL, Oracle, SQL Server, etc.
You can perform a join between a query on a database of one type and a query on a database of another type.
Therefore, the data can be found in different databases. You have the ability to extract and aggregate data from any source.
This feature is very useful for managing existing Information Systems.
How to?
To better understand the operating mode of the multi-database queries, let's look at a simple example:
  1. On an Oracle database, the following query (named MyQry1) is run by HExecuteSQLQuery. This query is used to select the record numbers of the customers.
    SELECT Client.CLCleunik+10 AS CLCleunik10 FROM Client
  2. On an HFSQL database, the following query (named MyQry2) is run by HExecuteSQLQuery. This query is used to select the record numbers of the customers and their order number.
    SELECT CLCLEUNIK,Commande.NumeroCommande AS NUMCOMMANDE FROM COMMANDE
  3. The multi-database query executed is as follows:
    SELECT * FROM MaReq1,MaReq2
    WHERE MaReq2.CLCLEUNIK=MaReq1.CLCleunik10
    AND (MaReq2.NUMCOMMANDE = '37348' OR MaReq1.CLCleunik10=80)

    This query is run itself by HExecuteSQLQuery.
Remark: Multi-database queries cannot be performed with "SQL query" variables.. It is necessary to use "Data Source" variables..
Versión mínima requerida
  • Versión 11
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 25/04/2024

Señalar un error o enviar una sugerencia | Ayuda local