SELECT
incident.createDate,
LEFT(incident.createDate,11)as EntryDate,
ContactDetails.cityCode,
patient.insurance,
FROM ......
WHERE
incident.createDate Between Convert(smalldatetime, '01/07/2012', 103) and Convert(smalldatetime, '31/12/2012', 103)
and servicecharges.serviceid = 31
and ServiceRequestDescription LIKE '05.06%'
and chargeDescr = 'Ε0 50.01'
and incident.status != 6
order by createDate ASC, contactdetails.cityCode ASC, patient.insurance ASC
作为输出我得到
15642 2012-08-03 11:45:07.153 Aug 3 2012 103 15
我想要得到的是
15642 2012-08-03 103 15
EntryDate 如上所述投射日期,所以我不想要它。下单也是错误的。它使用日期正确命令输出,但城市代码和保险不正确..
有任何想法吗?