On Wed, 19 Mar 2008 12:35:35 +0000 (UTC), docdwarf@[EMAIL PROTECTED]
() wrote:
>
>So... yesterday I get an e-mail of a forward to a response to a forward
of
>a reply to a forward of an FYI to a forward of... etc, going back about
>two months... with the question of 'Can you do something about this?'
>
>My response is 'I'm not sure what is wanted. If someone can tell me,
>clearly and unambiguously:
>
>1) Selection criteria - out of (n) employees we need to look at the ones
>which have (condition or (combination of conditions))
>
>2) Output requirements - for the employees whose data satisfy 1) above we
>need to see (fields)
>
>3) Date span - we need this information for (start period - end period)
>
>... then I should be able to tell you if this is something I can put
>together quickly or if it will take a while longer.'
>
>The response was surprisingly to-the-point, given the organisation...
>along the lines of 'For all the employees of the Midwestern Division
>who qualify for Unsup****ted Dementia Leave that left the organisation and
>received Miscellaneous Graft and Corruption payouts from October 2006 to
>the present we want to see name, separation date, amounts paid out and
>(some other stuff)'.
>
>And so... I've sent off my response. What follows are some almost
>verbatim quotes:
>
>(note - this is a shop that runs on files, not on a database)
>
>1) Employees of the Midwestern Division - what value(s) in which field(s)
>in what file(s) indicate an employee of the Midwestern Division?
>
>2) Employes of the Midwestern Division who qualify for Unsup****ted
>Dementia Leave - given 1) above, what value(s) in which field(s) etc.?
>
>3) Employes of the Midwestern Division who qualify for Unsup****ted
>Dementia Leave that left the organisation - given 1) and 2) above, what
>value(s) in which field(s) etc... you might begin to sense a pattern
here.
>
>... and the final sentences were:
>
>If all the data you request can be found in a single file (e.g., the
>Paymaster) then this will be a moderately ***bersome task.
>
>If multiple files need to be matched and merged for only single pay
>periods this will be a ***bersome and time-consuming task.
>
>If multiple files need to be matched and merged for multiple pay periods
>then this will be a ***bersome, time-consuming and unwieldy task.
>
>... and the response will not be, I believe... a pleasant thing to see.
select name, separation_date, dirty_money
from employees emp,
(select employee, sum(amount_paid) as dirty_money
from payroll_detail pd
where debit_account = '6969'
and payment_date between to_date(20051001) and sysdate
group by employee
having dirty_money > 0) crook
where crook.employee = emp.employee
and emp.separation_date is not null
and emp.division in
(select division from divisions where division_name like
'Midwest%')
and emp.start_date >
(select min(start_date) from employees where name like
'%Dwarf%')
-- Query preparation time: 5 minutes


|