Workaround 1 - use native Unicode column
- Last UpdatedJan 04, 2023
- 1 minute read
- PI System
- PI SQL Client ODBC 2021
- Developer
When the TO_NCHAR capability is disabled, the string comparison for Unicode String columns is not delegated to the remote query and the comparison is done in post-processing.
SELECT e."Name" Element, ea."Name" Attribute,
ea."Value"
FROM Element.Element@pi e
INNER JOIN Element.Attribute@pi ea ON ea."ElementID" = e.ID
WHERE ea."Name" = 'Plant'
AND ea."Value_String" Like N'H%'
ORDER BY e."Name", ea."Name";