Just curious if anyone has insights to share on data type ‘sysname’,
I have a BAQ to list ChgLog records with parameter criteria:
“TableName BEGINS @Table parameter”.
The following warning message is displayed when the BAQ is analyzed/saved.
“Data type mismatch in subquery ‘SubQuery1’ criteria between ‘ChgLog.TableName’ field of type ‘sysname’ and ‘Table’ parameter of type ‘nvarchar’. This may cause query execution errors”.
I just ignore the warning message and the BAQ is returning the records I need.
This is the first time I’ve noticed this in E10 and currently I have only a general idea about the properties of the type sysname.
I have nothing useful on the issue. But if you wanted to mute the warning you could probably make a calculated field and cast the TableName directly to an nvarchar
Thanks, I added a subquery and cast the sysname to nvarchar
Applying the parameter against the cast value in the top level… no warning.
From the little reading I’ve done, it appears that type SYSNAME is recommended for storing object names (in this case the table name). Since it automatically conforms to version rules for identifiers.
Sounds like there are potential performance issues depending on what you are doing too.
e.g. a lookup involving a sysname might result in background conversions that can sap resources.