Monday, April 16, 2012

SQL using lookup table to create a supplier quote

I have a lookup table called supplier, which has all of my suppliers information.
I also have a lookup table called materials, which has all of my materials information.
I'm creating another table called supplier_quote in which I will store 3 suppliers with at least 3 raw materials each as well as price and quantity.



the purpose of this is that the user in visual basic can call 1 supplier and get a price for each of the 3 materials, call the next supplier and input the price of the same 3 materials and again with the 3rd supplier.



I was thinking a drop down box in the form to display each suppliers name and raw material, but so far I can't seem to understand the logic behind it.



I need something like this



supplier 1
raw material A. $23
raw material B. $25
raw material C $30



supplier 2
raw material A. $22
raw material B. $21
raw material c. $35



supplier 3
raw material A. $23
raw material B. $32
raw material C. $29



all that information would be one record in the supplier_quote table, because it all goes in one same quote. the prices are input by the person doing the quote, so I'm guessing they get stored in this same table.



anyone please help? I appreciate it in advance. I'm using visual basic 2010 and SQL 2008.





No comments:

Post a Comment