When creating an EZWriter Data Source, you are able to use SQL to CAST or CONVERT a value into a specific data type. If you CAST or CONVERT to a data type of BIGINT, the EZWriter Data Source will not cause any errors, however the value will not be included within your results.
If you are trying to use ROW_NUMBER in your SQL statement, it will return a data type of BIGINT. To get this value to appear correctly in EZWriter, you will need to CAST or CONVERT it to a different data type, such as INT or VARCHAR.
DECLARE @DUMMY INT;
WITH RESULTS AS (
SELECT
[ROW_NO_1] = CAST(ROW_NUMBER() OVER(ORDER BY EV200_EVT_DESC) AS INT),
[ROW_NO_2] = CONVERT(VARCHAR(6), ROW_NUMBER() OVER(ORDER BY EV200_EVT_DESC)),
EV200_EVT_DESC
FROM
EV200_EVENT_MASTER
)
SELECT * FROM RESULTS
Comments
0 comments
Please sign in to leave a comment.