Operand type clash: int is incompatible with datetime2
-3
votes
1
answer
33947
views
The code below generates this error:
###### ERROR
> Msg 206, Level 16, State 2, Procedure usp_TRAC_PSE_Step_12_Resource_Request_OBJECT-Production-Part1, Line 93
Operand type clash: int is incompatible with datetime2
###### CODE
insert into [dbo].[pse__Resource_Request__c_LOAD]
(OwnerId, pse__End_Date__c, pse__Milestone__c, pse__Percent_Allocated__c, pse__Planned_Bill_Rate__c,
pse__Practice__c, pse__Project__c, pse__Region__c, pse__SOW_Hours__c, pse__Request_Priority__c,
pse__Resource_Request_Name__c, pse__Resource_Role__c, pse__Start_Date__c, pse__Status__c,
Partner_Requested__c, OA_Migration_ID__c, CurrencyIsoCode, Percent_Onsite__c)
select (select [OwnerId] from [dbo].[pse__Proj__c_LOAD] where [OA_Migration_ID__c] = p.id) 'OwnerId'
, case when case when p.custom_35 is null then ISNULL(b.startdate, '01/01/1900 23:59:59.999') + 180 else p.custom_35 end 'SOW Hours'
and isnull(b.deleted,0) 1
--and mp.stage = 'Active'
Asked by NicolasGutierrezToD
(13 rep)
Aug 30, 2019, 01:33 AM
Last activity: Feb 28, 2022, 08:03 PM
Last activity: Feb 28, 2022, 08:03 PM