cardoza Posted June 30, 2009 Posted June 30, 2009 what would be the script steps for this problem: lets say I select a item, and then I assign the qty of 5 to that Item, and after I run the script, I have 5 separate records generated for that item. thank you.
bcooney Posted June 30, 2009 Posted June 30, 2009 Why? This doesn't sound like the correct approach/design. Can you provide more detail?
cardoza Posted June 30, 2009 Author Posted June 30, 2009 the reason behind it is this. I have a salesman, and I give him a qty of 5 of a particular product, and I want to keep track of how many I gave him and also when he sells one product I want to enter a customer name of who he sold it to. i imagined there is a better way of doing this, but all I could think of is generating one record for each item( even though it is the same type) and then I just go in and enter the customer information one a time. any guidance on a better way of doing this would be greatly appreciated thanks.
bcooney Posted June 30, 2009 Posted June 30, 2009 " have a salesman, and I give him a qty of 5 of a particular product," Do you have a table of salespeople? Do you have a table of products? On what type of transaction do you give him 5 products? Does this transaction have a corresponding line items table? "enter the customer information one a time" Do you have a customer table? Do you have a table that tracks sales? Does it have a line items table? Can those line items relate back to the line items in the transaction that was used to "give" the salesperson the products?
cardoza Posted June 30, 2009 Author Posted June 30, 2009 Do you have a table of salespeople? yes I do. Do you have a table of products? yes I do On what type of transaction do you give him 5 products? this is one of the steps where I don't know where to start Does this transaction have a corresponding line items table? this is one of the steps where I don't know where to start "enter the customer information one a time" Do you have a customer table? I don't have a table for customers, I just figured that I would just create a customer name field and enter names there ( this is where I might have gone off track) Do you have a table that tracks sales? Does it have a line items table? Can those line items relate back to the line items in the transaction that was used to "give" the salesperson the products? negative on both of these. I just don't know how to accomplish these 2 steps
bcooney Posted July 1, 2009 Posted July 1, 2009 Yep, you need more tables in your system. Having the correct setup will help you tremendously down the road when you try to report on the data. So, you need a table for the transaction where you give the salesperson a product. What do you think you should call this? This table should have a related table of line items. Also, create a table for Customers. I'd like to remind you that you need to use an auto-entered serial number for each table to uniquely identify each record. So, in your Customer table, you'd have CustomerID (auto-enter serial number field, unique and not modifiable). You need to study up a bit. Have you read David Katchel's White Paper for Novices ?
Recommended Posts
This topic is 5625 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now