We help IT Professionals succeed at work.

Operand type clash: date is incompatible with float

I am getting this error on this select statement - i don't see the problem. I added what the data resembles in a screen shot
SELECT cd.UploadTime  As 'ControllerTime',l.Location AS 'Location','Tool Communication' AS 'Event',
('Job Circulating Hours: '  + cd.JobCirculatingHours +';'+' Job Powered On: ' + cd.JobPoweredOnHours+';'+' Job Number of Pulses: ' + cd.JobNumberOfPulses+';'+' Job Start Date: ' + cd.JobStartDate) AS 'Event Notes'  
FROM ControllerData as cd  
LEFT JOIN SerializedAssets as sa ON sa.SerialNumber = cd.SerialNumber  
LEFT JOIN Locations AS l ON cd.DefaultLocationIndex = l.LocationIndex  
WHERE sa.ToolType = 'CO' AND cd.SerialNumber = 1006  GROUP BY cd.UploadTime, l.Location,cd.JobCirculatingHours,cd.JobPoweredOnHours,cd.JobNumberofPulses,cd.JobStartDate 

Open in new window

data
Comment
Watch Question

Database Consultant
Top Expert 2009
Commented:
You need to convert all the columns which are not character types in this statement
'Job Circulating Hours: '  + cd.JobCirculatingHours +';'+' Job Powered On: ' + cd.JobPoweredOnHours+';'+' Job Number of Pulses: ' + cd.JobNumberOfPulses+';'+' Job Start Date: ' + cd.JobStartDate)

cd.JobCirculatingHours   ---> CAST( cd.JobCirculatingHours  as varchar(30 ))

do that for the rest

Author

Commented:
I guess I did it wrong the first time because I tried that earlier thanks for the second lesson :D

Author

Commented:
Thanks