cast

Nov 10 2010 2:38 AM
 i am converting a varchar type to int..

sum(cast(Replace([ExtraWokedHrs],'Mins','')as int)) as [ExtraWokedHrs]

but i am getting an error...

Msg 245, Level 16, State 1, Procedure PerfomanceReport, Line 544
Conversion failed when converting the varchar value '0 Mins' to data type int.

PLS help




Answers (6)