MSCEWI4029

Information for the column was not found. STRING used to match CAST operation

Severity

Medium

Description

This EWI is added in Table-Valued User Defined Functions where the return type of a column can not be determined during the conversion. STRING is used as a default to match the CAST operation in the SELECT statement

Code Example

Input Code:

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

Output Code:

Recommendations

  • The user should check which is the correct data type that could not be found and change it in the RETURNS TABLE statement definition.

  • If you need more support, you can email us at [email protected]

Last updated