MSCEWI4031

Information for the expression was not found. CAST to STRING used

Severity

Medium

Description

This EWI is added in Table-Valued User Defined Functions where the return type of an expression can not be determined during the conversion. CAST A STRING operation is used to match the default STRING datatype in the RETURNSstatement

Code Example

Input Code:

CREATE FUNCTION GetDepartmentInfo()
RETURNS TABLE
AS
RETURN
(
  SELECT DepartmentID, Name, GroupName
  FROM HumanResources.Department
);

Output Code:

Recommendations

Last updated