Skip to content

Commit

Permalink
fix typo in sql
Browse files Browse the repository at this point in the history
  • Loading branch information
Grahame Grieve committed Oct 14, 2024
1 parent 53d6098 commit 2a67759
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/ftx/ftx_loinc_services.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 2a67759

Please sign in to comment.