Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Msg 8152, Level 16, State 14, Expand / Collapse
Author
Message
Posted Friday, June 10, 2011 7:46 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, September 17, 2012 5:14 AM
Points: 9, Visits: 29
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 [IP Address] ,
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
Post #1123337
Posted Friday, June 10, 2011 7:49 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 9:26 AM
Points: 1,268, Visits: 3,605
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. Get your answers faster.
Post #1123344
Posted Friday, June 10, 2011 7:56 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, September 17, 2012 5:14 AM
Points: 9, Visits: 29
ya but if i increase the size thn too i m getting the same error
Pls suggest......
Post #1123352
Posted Friday, June 10, 2011 8:15 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, September 17, 2012 5:14 AM
Points: 9, Visits: 29
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
Post #1123373
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse