Query

S

Sundeep

I have 2 tables, Invoice table and Stockist Table which linked using stockist
code.

Stockist table gives information about type of stockist (i.e. pool or non
pool) and stockist is assiged to which territory.

In case of non pool territory, it is straight one to one relation.

In case of pool territory, stockist sale is divided to more than one
territory like 2, 3 or 4 (max) in different % like 50 % each or 33.33 % each
or 25 % each.

Stockist sale can be separated in pool and non pool criteria.

Need help on Pool territory Stockist sale :

1 Summing up stockist sale and divide sale to those territories with
percentage given.

2 After doing this, need to merge these sale to Non Pool stockist sale so as
to get final sale.

3 At end final sale will be retrieved based on Territory code.
 
D

Dale Fye

Your question is too vague, with the data given. Give us the structure of
your Invoice and Stockist tables, along with a couple of rows worth of data.
Then provide what you want your final output to look like, based on the data
you have provided.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top