Workaround 2 - change Unicode columns into ASCII
- Last UpdatedJan 04, 2023
- 1 minute read
- PI System
- PI SQL Client ODBC 2021
- Developer
Use the PI SQL View for Attribute2 that was created earlier and make the comparison with the AnsiString column.
SELECT e."Name" Element, ea."Name" Attribute,
ea."Value"
FROM Element.Element@pi e
INNER JOIN Element.Attribute2@pi ea ON ea."ElementID" = e.ID
WHERE ea."Name" = 'Plant'
AND ea."Value_String" Like N'H%'
ORDER BY e."Name", ea."Name";