Let me explain I have an list of employees that say when they actually worked. I have another table that gives me period and begin and Ending Dates for that period. I want a query that will take the day worked and finds the period that it falls in.
table 1
David 05/10/2013
Peter 05/16/2013
table 2
Period_Num Begin_Period End_Period
Period 1 01/05/2013 05/15/2013
Period 2 05/16/2013 12/31/2013
I want the final to read:
David Period 1
Peter Period 2
Is there a way to do this in sql
particularly in a view?
Thanks!