Problem with database, relationships, everything...

  • Thread starter Thread starter trigger
  • Start date Start date
T

trigger

Guest
I dont know how to explain because my english its bad, so im going to try:

There's a company named "A" that their objective its to go to restaurants and sell products (fish, meat, seafood...), but these products are from a "big company" that has no comercial department, and hires companies like "A" to sell its products, paying about 10% of what they sell... So the "A" company has its sellers (each seller its atribuited to a few clients) to go to restaurants and make an appointment of the products the restaurant wants and send it to the "big company", the "big company" at the end of the month sends a report (in ms-excel format) of what the "A" company have sold and the ammount of ?Comission? %.

In order to get the data from excel i made an importation with the following fields:

selling table
Product Reference
Client Code
Invoice Number
Date
Value
Quantity

I've inserted all data about produts, clients and sellers in other tables
The problem seems to be in when i change the seller attribuited to a client, the database changes all records in the "selling table" instead of changing records from the day i've changed the employe...
Tables relationship between clients and sellers its w/out refer. integrity


Clients Sellers
Client Code /---------- Seller code
Client Name / Seller name
Adress / Comission of seller
Seller <-------/ .....
etc...


If u cant understand i try can explain better but my english its very weak

Tks..
 
I dont know how to explain because my english its bad, so im going to try:

There's a company named "A" that their objective its to go to restaurants and sell products (fish, meat, seafood...), but these products are from a "big company" that has no comercial department, and hires companies like "A" to sell its products, paying about 10% of what they sell... So the "A" company has its sellers (each seller its atribuited to a few clients) to go to restaurants and make an appointment of the products the restaurant wants and send it to the "big company", the "big company" at the end of the month sends a report (in ms-excel format) of what the "A" company have sold and the ammount of ?Comission? %.

In order to get the data from excel i made an importation with the following fields:

selling table
Product Reference
Client Code
Invoice Number
Date
Value
Quantity

I've inserted all data about produts, clients and sellers in other tables
The problem seems to be in when i change the seller attribuited to a client, the database changes all records in the "selling table" instead of changing records from the day i've changed the employe...
Tables relationship between clients and sellers its w/out refer. integrity


Clients
Client Code
Client Name
Adress
Seller
etc...

Sellers
Seller code
Seller name
Comission of seller

If u cant understand i try can explain better but my english its very weak

Tks..
 
Problem with sellers and clients relationships....

Well i've a problem, i've a table clients (ClientID, ClientName, SellerID,...) and a table sellers (SellerID, SellerName, SellerComission, etc) and a table of sells (SellID, Date, Client, Quantity, Value, etc).

When i want to populate the sell records i obtain data importing from excel, and its everithing OK, the problem its when i create a new seller and i attribute that seller to some clients... The old records with other sellers get the new seller instead....
I could attribute the seller directly to the sells table in spite of attribute it to the client, but the problem its that the sellers need to have allways the same clients...

Im getting without ideas... Pls help :o
 

Users who are viewing this thread

Back
Top Bottom