Msg 8152, Level 16, State 14,

  • DECLARE @DUP TABLE

    (

    Support_URL VARCHAR(300),

    regid BIGINT,

    UpdateId VARCHAR(200),

    DJobId BIGINT,

    ResourceName VARCHAR(250),

    ResFriendlyName VARCHAR(250),

    IPAddresses VARCHAR(250),

    UpdateClassification VARCHAR(200),

    Severity VARCHAR(50),

    UpdateTitle VARCHAR(100),

    IntendedProduct VARCHAR(100),

    Patch_Status VARCHAR(200),

    DeployMethod VARCHAR(200),

    JobExeDate varchar (50),

    Patch_Install_Date Datetime,

    OperatingSYS VARCHAR(200),

    ServicePack VARCHAR(100),

    ReleaseDate Datetime,

    KBArticle varchar(100),

    SecurityBulletinId VARCHAR(100),

    Auto_Update VARCHAR(100)

    )

    INSERT INTO @DUP

    SELECT CASE WHEN MOREINFOURL='' THEN P.SUPPORTURL ELSE MOREINFOURL END [Support URL], rm.regid ,P.UpdateId as [Update Id] ,

    DP.DJobId , RM.ResourceName [System Name] ,RM.ResFriendlyName AS [Friendly Name],RM.IPAddresses as 127.0.0.1 ,

    P.UpdateClassification as [Update Classification] ,

    CASE ISNULL(Msrcseverity,'')

    WHEN '' THEN 'Not Applicable'

    ELSE Msrcseverity

    END Severity,

    P.UpdateTitle as [Update Title] , IntendedProduct as [Affected Product],

    Case when (DP.Patch_Status='UPLOADED' and datediff(d,expirydate,@DATE)>1) then 'Job Expired'

    else

    case when (DP.Patch_Status='UPLOADED' and (expirydate>@DATE or datediff(hh,expirydate,@DATE)<23)) then 'Job Scheduled'

    else DP.Patch_Status

    end

    end [Installation Status],DeployMethod [Deploy Method],

    convert (varchar(25), DP.JobExeDate),

    convert (varchar (10),Patch_Install_Date,101),

    ISNULL(P.OperatingSYS,'') [Operating System] ,

    ISNULL(P.ServicePack,'') [Service Pack],

    convert (varchar (10),ReleaseDate,121) as [Release Date],

    P.KBArticle as [KB Article], P.SecurityBulletinId as [Bulletin Id] ,

    CASE @OSType

    WHEN 'D' THEN CASE ISNULL(GS.DeskTopDeployId,0)

    WHEN 1 THEN 'No'

    WHEN 2 THEN 'All'

    WHEN 3 THEN 'White Listed'

    END

    ELSE CASE ISNULL(GS.ServerDeployId,0)

    WHEN 1 THEN 'No'

    WHEN 2 THEN 'All'

    WHEN 3 THEN 'White Listed'

    END

    END [Auto Update]

    FROM @viwtable RM

    JOIN GlobalConfig_Site GS WITH(NOLOCK) ON RM.SiteId = GS.SiteID

    Cross Apply dbo.fn_pth_MissingTables(RM.Regid,RM.Scandatetime) P

    JOIN PTH_PatchDeploymentStatus DP WITH(NOLOCK) ON P.RegId = DP.RegId

    AND P.UpdateId = DP.UpdateId --AND ISNULL(DP.UpdateId,'') <> ''

    WHERE RM.REGID=RM.REGID AND P.REGID >@i

    AND DP.JobExeDate BETWEEN Convert (varchar(10),@FromDate,101) AND convert (varchar (10),@ToDate,101)

    I m getting an error as "Msg 8152, Level 16, State 14, Procedure PTH_DeploymentStatus_PR1, Line 101

    String or binary data would be truncated.

    The statement has been terminated.

    "

    Pls provide me a solutions

  • it means you're trying to insert data into a field that isn't big enough to hold it.

    for example, you're trying to insert 'this is a test string' into a varchar(10) field.

    ______________________________________________________________________________________________
    Forum posting etiquette.[/url] Get your answers faster.

  • ya but if i increase the size thn too i m getting the same error

    Pls suggest......

  • This is my execution string

    exec [PTH_DeploymentStatus_PR1] 1,1,'D','2007-12-12 00:00:00.000','2009-12-28 19:06:53.940','1,0'

    which gets the resultset but if i change the date as

    exec [PTH_DeploymentStatus_Pr1] 1,1,'D','2007-12-12 00:00:00.000','2010-09-21 19:06:53.940','1,0'

    Then i get an error

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply