I am hoping somebody can help me out as this is the first time I have had to ask a question, normally I can search and find an answer.
My problem is I need to find the maximum date before another date.
I have 2 tables 1 with a bunch of records with a create date and another with a start date of an Owner. I need to know the owner whos start date is the last one before the create date.
I wnat something like Max(startdate<=CreateDate). The trouble I'm having is if there are 2 or more Start dates before the create date the query is returning both.
I record could have more than 1 owner but the start dates dont overlap.
My problem is I need to find the maximum date before another date.
I have 2 tables 1 with a bunch of records with a create date and another with a start date of an Owner. I need to know the owner whos start date is the last one before the create date.
I wnat something like Max(startdate<=CreateDate). The trouble I'm having is if there are 2 or more Start dates before the create date the query is returning both.
I record could have more than 1 owner but the start dates dont overlap.