6 hours ago, mdsiddiqali wrote
Hi Friends,
I have a problem in getting value of a field from other table,I created the table 1 with fields of product name,cost,In Table 2 i created product name which is a look up from table one and cost and quantity,My task is when i select product i should get cost automatically.
MD.SIDDIQALI
Products( ID, ProductName, Cost )
Table2( ID, ProductName, Quantity )
SELECT Products.ID, Products.ProductName, Products.Cost, Table2.Quantity FROM Table2 INNER JOIN Products ON Table2.ProductName = Products.ProductName
Note that this is bad normalisation because you're defining a relationship based on a textual value, rather than an integer ID.
This sounds suspiciously like undergraduate databases homework...
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.