문제

I'm doing conversion of Error Code thrown by SSIS package using SQL 2008 into meaningfull description provided by SSIS. All Error Codes and their Descriptions can be found here as reference.

My question is does anyone know what is maximum length of Error Code description which could appear here? I want to store this error description in table and don't want to do it by setting data type to varchar(max) (insufficient approach).

Thanks in advance

도움이 되었습니까?

해결책

It looks to be 423 characters based on the last time I pulled those codes for my post

;WITH ERRORS ([Hexadecimal code],[Decimal Code],[Symbolic Name],[Description]) AS
(
    SELECT '0x8002F347',-2147290297,'DTS_E_STOREDPROCSTASK_OVERWRITINGSPATDESTINATION','Overwriting Stored Procedure "__" at destination.'
)
SELECT
    MAX(LEN(E.DESCRIPTION)) AS DescriptionLength
FROM
    ERRORS E;

I'd just round up to 450/500/512 for your purposes

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top