PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → Why this SQL Query doesn't work?
Why this SQL Query doesn't work?
Started by Stefano Sarcletti, Mar., 11 2026 4:49 PM - No answer
Posted on March, 11 2026 - 4:49 PM
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.