The largest date between all
Let me try to be clearer and explain the mess:
I have the control of extensions that works Next form, when the connection is particular from the employee, the company charges for her, imagine that in the period from 01/09/2007 to 09/30/2007 the employee Fabio and the employee Rafael called a phone that is not a contact from the company, a friend of them for example whose phone number is: 43
33334444:
They linked the following date / sequence:
Select all
Nome Data Nº tel
----------------------------------------
FABIO 01/09/2007 43 33334444
RAFAEL 10/09/2007 43 33334444
When the user requests a filter of the month of December / 2007, again I check
if there are records of this external telephone (43 33334444)
outside of the informed period and with employees already related *, looking for employees who are already related to that number, and in the tabular block I would already bring this employee with a different color suggesting that that number belongs to him, what I want is r An employee only, in this case, the last that called that number.
Dae I thought of doing a Select that returns the last call to the phone (433334444) and that is with the capitio already related back there in September
* The head of the Deptant relates the employee as follows, the records are displayed in a multirecord block, and passes a list on the same paper, by the DEPT for each function to identify his connections, and the user ( In the system) ties these links to employees.