views:

59

answers:

1

Storing daily stats for employees, and I want to store daily sales per employee (required for reporting, please don't argue the design! lol )

Table:

EmployeeID DateStamp

I figure I should make the datestamp a smalldatetime since I don't need that much accurancy.

What should my query look like to see if there is an entry for the user for the given day?

Update Actually, I have to see if the current day has a record, if not, then reset the older record with todays date and clear the salesAmount column.

+1  A: 

You could try something like

SELECT * WHERE employeeID = 'ID' AND DateStamp = 'Date'

That should then pull all of the row's information where those two criteria are met.

Slevin
Okay. I posted this prior to the update. I apologize.
Slevin