Есть такой вот запрос:
CODE (htmlphp):
скопировать код в буфер обмена
скопировать код в буфер обмена
- SELECT DISTINCT dbo.Patient.PatientID,
- dbo.Patient.PatientHistoryNumber,
- dbo.Patient.PatientName,
- dbo.Patient.PatientBirthDate,
- dbo.Patient.PatientSexRef,
- dbo.Patient.PatientAddress,
- dbo.Patient.PatientCreationDate,
- dbo.Booking.BookingStatusRef,
- dbo.Booking.BookingCreationUserRef,
- dbo.Booking.BookingPriceDate,
- dbo.Booking.BookingPaymentValue,
- dbo.Booking.BookingDate,
- dbo.Booking.BookingExternalID2,
- dbo.Service.ServiceCode,
- dbo.Service.ServiceNameLanguage1,
- dbo.Schedule.ScheduleStartTime,
- dbo.Schedule.ScheduleEndTime,
- dbo.Venue.VenueName
- FROM
- dbo.Patient
- WHERE
- BookingDate BETWEEN '2011-01-28' AND '2011-01-29' AND ServiceCode != '-1'
- ORDER BY BookingDate