我正在处理以下问题:
SELECT att.AttendenceCD, convert(varchar, att.AttDate, 101) AttDate, att.EmployeeCD
FROM Attendance att
where att.EmployeeCD = 2234 and att.AttDate = '11/02/2011'
如何将此查询转换为HQL?
答案 0 :(得分:1)
检查一下。我希望它会起作用
SELECT att.AttendenceCD, convert(varchar(10), att.AttDate, 101) AttDate, att.EmployeeCD
FROM Attendance att
where att.EmployeeCD = 2234 and att.AttDate = '11/02/2011'
其他明智的
SELECT att.AttendenceCD, cast(att.AttDate, datetime(101)) AttDate, att.EmployeeCD
FROM Attendance att
where att.EmployeeCD = 2234 and att.AttDate = '11/02/2011'