View Issue Details

IDProjectCategoryView StatusLast Update
0008845ADK-Xojo-V4RBCursorspublic2020-08-22 15:14
ReporterFrançois Van Lerberghe Assigned ToRuslan Zasukhin  
PriorityurgentSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
PlatformALLOSALLOS VersionALL
Fixed in Version10.4.x 
Summary0008845: Wrong SQL result using method field in where clause
DescriptionThe SQL result doesn't give me all the records matching the where clause when I use a method field (calulated).
This happend on all system, with the latest release (10.4.20)

Steps To ReproduceOpen VStudio
Open the provided db (DBTest2)
Type this query :

SELECT
 Transactions.Reference
FROM
 Transactions,
 Journaux
WHERE Transactions.Journal = Journaux.Code
AND Journaux.UpperType = 'V'
AND Journaux.Code = 'V01'
ORDER BY 1

=> this give me 3218 records. That's right.

Now, change Journaux.Code by Transactions.Journal.
This have to produce the same results :

SELECT
 Transactions.Reference
FROM
 Transactions,
 Journaux
WHERE Transactions.Journal = Journaux.Code
AND Journaux.UpperType = 'V'
AND Transactions.Journal = 'V01'
ORDER BY 1

=> this give me 668 records (VStudio 10.14.18). That's wrong.

Now, from this query, delete AND Journaux.UpperType = 'V' (this have to produce the same results as Journaux.UpperType = 'V' is always True if Transactions.Journal = 'V01') :

SELECT
 Transactions.Reference
FROM
 Transactions,
 Journaux
WHERE Transactions.Journal = Journaux.Code
AND Transactions.Journal = 'V01'
ORDER BY 1

=> this give me 3218 records. That's right.

Note that Journaux.UpperType is a method field = Upper("Type")
Additional InformationTo me, this bug seems related to the bug 0008839...
TagsNo tags attached.

Activities

François Van Lerberghe

François Van Lerberghe

2020-08-22 10:26

reporter  

DBTest2.zip (137,983 bytes)
Ruslan Zasukhin

Ruslan Zasukhin

2020-08-22 15:14

administrator   ~0011401

v10.4.22

Issue History

Date Modified Username Field Change
2020-08-22 10:26 François Van Lerberghe New Issue
2020-08-22 10:26 François Van Lerberghe File Added: DBTest2.zip
2020-08-22 15:14 Ruslan Zasukhin Assigned To => Ruslan Zasukhin
2020-08-22 15:14 Ruslan Zasukhin Status new => resolved
2020-08-22 15:14 Ruslan Zasukhin Resolution open => fixed
2020-08-22 15:14 Ruslan Zasukhin Fixed in Version => 10.4.x
2020-08-22 15:14 Ruslan Zasukhin Note Added: 0011401