From 2a677594c315b02fef7a727649d90071e07dd476 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Tue, 15 Oct 2024 06:09:01 +0800 Subject: [PATCH] fix typo in sql --- library/ftx/ftx_loinc_services.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/ftx/ftx_loinc_services.pas b/library/ftx/ftx_loinc_services.pas index 719621acf..f79698068 100644 --- a/library/ftx/ftx_loinc_services.pas +++ b/library/ftx/ftx_loinc_services.pas @@ -1083,8 +1083,8 @@ function TLOINCServices.filter(forExpansion, forIteration : boolean; prop: Strin else if (FRelationships.ContainsKey(prop) and (op = foIn)) then begin s := commaListOfCodes(value); - result := FilterBySQL(c, d, 'select SourceKey as Key from Relationships where RelationshipTypeKey = '+FRelationships[prop]+' and TargetKey in (select CodeKey from Codes where Code in ('+s+') order by SourceKey ASC', - 'select count(SourceKey) from Relationships where RelationshipTypeKey = '+FRelationships[prop]+' and TargetKey in (select CodeKey from Codes where Code in ('+s+') and SourceKey = ', forExpansion) + result := FilterBySQL(c, d, 'select SourceKey as Key from Relationships where RelationshipTypeKey = '+FRelationships[prop]+' and TargetKey in (select CodeKey from Codes where Code in ('+s+')) order by SourceKey ASC', + 'select count(SourceKey) from Relationships where RelationshipTypeKey = '+FRelationships[prop]+' and TargetKey in (select CodeKey from Codes where Code in ('+s+')) and SourceKey = ', forExpansion) end else if (FProperties.ContainsKey(prop) and (op = foEqual)) then result := FilterBySQL(c, d, 'select CodeKey as Key from Properties, PropertyValues where Properties.PropertyTypeKey = '+FProperties[prop]+' and Properties.PropertyValueKey = PropertyValues.PropertyValueKey and PropertyValues.Value = '''+SQLWrapString(value)+''' COLLATE NOCASE order by CodeKey ASC',