I am getting #Error when using the following code to display the column MachineId based on the paramter @DisplayMachineId-
WHEN 1 THEN CAST(MachineId AS VARBINARY(8))
ELSE CAST(MachineId AS SQL_VARIANT)
END AS 'MachineId'
I cannot do this in Report Level as it is having heavy performance issue. It's working when @DisplayMachineId is false i.e. value =0 but when value is 1 then am getting #Error as output.
Please remember to click Mark as Answer and Vote as Helpful on posts that help you. This can be beneficial to other community members reading the thread.
Glad to hear that your issue has been solved, thank you for sharing the useful information.
If you have any feedback on our support, please click
TechNet Community Support
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?