hi all... i am trying to grab rows based on two user-inputted criteria, 'theEmpID' and 'theDate'..and then, based on 'theDate' value, 'startDate' will be used as the criteria for the beginning date range up until the ending date range of 'theDate'
any pointers or help would be greatly appreciated
Code:
SELECT *
FROM [salesQuery]
WHERE emp_id = theEmpID AND date_of BETWEEN startDate AND theDate
WHERE (startDate = SELECT DISTINCT (begin_date)
FROM [salesQuery]
WHERE date_of = theDate)
any pointers or help would be greatly appreciated