Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Assuming you have a working select/update/delete statement with a date field, the following steps can be taken to extract a date range:

  1. Determine the name of the date field in the table.
  2. Specify the start and end dates of the desired date range.
  3. For a select statement, modify the where clause to filter on the desired date range using the date field. For example:
select from myTable where dateField >= startDate, dateField <= endDate
  1. For an update statement, modify the where clause to update only rows within the desired date range using the date field. For example:
update myTable set someColumn = someValue where dateField >= startDate, dateField <= endDate
  1. For a delete statement, modify the where clause to delete only rows within the desired date range using the date field. For example:
delete from myTable where dateField >= startDate, dateField <= endDate