SELECT alltable.t_stamp,
  'S03' AS SorterName,
  alltable.ParcelID,
  'S03aa' AS ScannerName,
  '0' AS IMGID,
  alltable.ScanLabel,
  alltable.ScanStatus,
  alltable.Length,
  alltable.Tray,
  alltable.AssignmentScanHist,
  alltable.DivertStatus,
  alltable.DEST_REQ,
  alltable.ACTUAL_DEST,
  alltable.SortCode
FROM alltable
WHERE alltable.t_stamp BETWEEN :starttime AND :endtime