I was wondering if someone could help me figure out how to fix my SQL as a result of this error message I'm getting with the following SQL below. Thanks
Error Message:
Server: Msg 8152, Level 16, State 9, Line 24
String or binary data would be truncated.
Warning: Null value is eliminated by an aggregate or other SET operation.
The statement has been terminated.
regards,
Brian
Error Message:
Server: Msg 8152, Level 16, State 9, Line 24
String or binary data would be truncated.
Warning: Null value is eliminated by an aggregate or other SET operation.
The statement has been terminated.
Code:
declare @tblBidList table (
BidId int primary key,
ProjectName varchar(200),
FacilityRate money,
GroupNum int,
BidDate datetime,
RecruitNum int,
HoldStatus varchar(50),
BidStatus varchar(50),
ClientFoodLowDollar money,
ClientFoodHighDollar money,
Notes varchar(500),
RespondentFood varchar(100),
TypeCode varchar(50),
UserID int,
ClientID int,
ClientContactID int,
FacilityID int,
ActiveFlag bit,
MaxStudyDate datetime,
MinStudyDate datetime
)
[b]Error Line Number is here[/b]
insert into @tblBidList (
BidId,
ProjectName,
FacilityRate,
GroupNum,
BidDate,
RecruitNum,
HoldStatus,
BidStatus,
ClientFoodLowDollar,
ClientFoodHighDollar,
Notes,
RespondentFood,
TypeCode,
UserID,
ClientID,
ClientContactID,
FacilityID,
ActiveFlag,
MaxStudyDate,
MinStudyDate
)
select b.BidId,
b.ProjectName,
b.FacilityRate,
b.GroupNum,
b.BidDate,
b.RecruitNum,
b.HoldStatus,
b.BidStatus,
b.ClientFoodLowDollar,
b.ClientFoodHighDollar,
b.Notes,
b.RespondentFood,
b.TypeCode,
b.UserId,
b.ClientId,
b.ClientContactId,
b.FacilityId,
b.ActiveFlag,
max(bsd.StudyDate),
min(bsd.StudyDate)
from tblBidStudyDate bsd,
tblBids_bak_07112006 b
where upper(b.BidStatus) not in ('CONVERTED TO JOB','CANCELLED','EXPIRED')
and b.BidId *= bsd.BidId
group by
b.BidId,
b.ProjectName,
b.FacilityRate,
b.GroupNum,
b.BidDate,
b.RecruitNum,
b.HoldStatus,
b.BidStatus,
b.ClientFoodLowDollar,
b.ClientFoodHighDollar,
b.Notes,
b.RespondentFood,
b.TypeCode,
b.UserId,
b.ClientId,
b.ClientContactId,
b.FacilityId,
b.ActiveFlag
regards,
Brian