SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Msg 8152, Level 16, State 14,


Msg 8152, Level 16, State 14,

Author
Message
shaikh.kurshid
shaikh.kurshid
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 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
calvo
calvo
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1806 Visits: 4007
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.
shaikh.kurshid
shaikh.kurshid
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 Visits: 29
ya but if i increase the size thn too i m getting the same error
Pls suggest......
shaikh.kurshid
shaikh.kurshid
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search