I'm trying to create an interbase stored procedure to achieve an objective but I can't even run my query as a basic sql statement so I am wondering if someone can help me please with the basic syntax.
Clients are associated with a number of jobs
Jobs are associated with a number of transactions
At inception of each job a figure for estimated total sales value is entered in the jobs table.
As time passes sales transactions are entered in the transactions table..
What I want to do is to create a single query to summarise results by client
This involves summing estimated sales from jobs for any given client and comparing with actual sales computed by summing the transactions across the jobs for the same client..
I feel sure that this must be possible but I cannot see how to do it...
Help PLEASE !!!!