PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Why this SQL Query doesn't work?
Why this SQL Query doesn't work?
Débuté par Stefano Sarcletti, 11 mar. 2026 16:49 - Aucune réponse
Posté le 11 mars 2026 - 16:49
I have a simple query which works fine if executed on any kind of database (sqlServer, Maria, PostgreSQL, HfSQL and so on).
But it doesn't work if execute with HexecuteSQLQuery(myDataSource, myConnection, hQueryWithoutHFCorrection, sqlCode)

The Sql code is:

SELECT * FROM (SELECT 1 UNION ALL SELECT 2)

The query abov is perfectly legit and works everywhere, also in HFSQL. But not from the windev code with the hQueryWithoutHFCorrection parameter. Technically, it's a "nested query". For this reason we have a lot of queries that works fine in HfSql but we cannot use with other databases (SqlServer, PostreSQL...) and we need to use then hQueryWithoutHFCorrection parameter.