Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
The query that i am working is given below which is working perfectly in my SQL server 2012
and not working in 2005/2008 version.
SQL
SELECT Employee.EmployeeID, Employee.FullName, EmpEntityParamValues.ParamValue,
FROM EmpEntityParamValues INNER JOIN Employee 
ON EmpEntityParamValues.EmployeeId = Employee.EmployeeID AND EmpEntityParamValues.EntityTypeParamID = @EntityTypeParamID
AND ( TRY_PARSE(EmpEntityParamValues.ParamValue AS smalldatetime) BETWEEN @CurrentDateTime AND @LastDateTime ) 


where EmpEntityParamValues.ParamValue is of varchar datatype and it contains different types of data,

How to replace try_parse for older version of sql?

Any help.??
Posted

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900