RIAS
asked on
Sql Query Datatype
Hello,
Results in
Msg 242, Level 16, State 3, Line 1
The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
But,
Works fine
Any suggestions?
SELECT Top 1 Ref ,[Date],Time,PatientName,Auth,DoctorClinic,Comments,FaxAuth,Title,FaxNumber,Attn
FROM table1 WHERE ( DeleteRecord is null or DeleteRecord = 0) AND [Date] >= '03/01/2017' and [Date] <= '13/01/2017' and Faxauth <> 'Yes' OR Faxauth IS not NULL
Results in
Msg 242, Level 16, State 3, Line 1
The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
But,
SELECT Top 1 Ref ,[Date],Time,PatientName,Auth,DoctorClinic,Comments,FaxAuth,Title,FaxNumber,Attn
FROM DIARY WHERE ( DeleteRecord is null or DeleteRecord = 0) AND [Date] >= '03/01/2017' and Faxauth <> 'Yes' OR Faxauth IS not NULL
Works fine
Any suggestions?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER