December 12, 2008 at 9:13 am
When Creating a View................i am facing the error as..............
" Msg 8152, Level 16, State 10, Procedure ddllogger, Line 7
String or binary data would be truncated.
The statement has been terminated. "
Here is the query if am using....
CREATE VIEW HumanResources.vEmployeesTime
AS
SELECT
hre.EmployeeID,
pc.LastName,
pc.FirstName,
hre.Title,
hre.VacationHours,
hre.SickLeaveHours
FROM
HumanResources.Employee hre
JOIN
Person.Contact pc ON hre.ContactID = pc.ContactID
WHERE
SalariedFlag = 1
AND
CurrentFlag = 1
Not sure where the problem is.....but when i double click the error it highlights "hre.Title".
Regards
ItzSam
December 12, 2008 at 6:11 pm
Asssumed this was just a posting error.
AS
Using this and creating the view in the AdventureWorks db - it works O.K. returning 52 rows
CREATE VIEW HumanResources.vEmployeesTime
AS
SELECT
hre.EmployeeID,
pc.LastName,
pc.FirstName,
hre.Title,
hre.VacationHours,
hre.SickLeaveHours
FROM
HumanResources.Employee hre
JOIN
Person.Contact pc ON hre.ContactID = pc.ContactID
WHERE
SalariedFlag = 1
AND
CurrentFlag = 1
Are you sure you posted a correct copy of your code?
December 14, 2008 at 12:32 pm
Itzsam (12/12/2008)
When Creating a View................i am facing the error as.............." Msg 8152, Level 16, State 10, Procedure ddllogger, Line 7
String or binary data would be truncated.
The statement has been terminated. "
Here is the query if am using....
CREATE VIEW HumanResources.vEmployeesTime
...
It appears to me that there is a DDL trigger on CREATE PROCEDURE in your database, name "ddllogger" and that it is where the error is coming from.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply