Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
websyd
Starting Member
16 Posts |
Posted - 2006-07-11 : 09:45:49
|
| hi im a beginner trying to build an application that needs the user to enter some data into a table named Delievary. This table is related to another table named Products. The Products table has the following columns :- ProductsId - PK ProductName ProductPriceDelievary table has the following columns :- DelivaryId - PK QuantityRecieved ProductId - FKi know to select i have to use inner joins but to insert is what i dont really know about. Please help me out |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-07-11 : 09:48:18
|
something like thisinsert into Products(ProductsId, ProductName, ProductPrice)values (. . . ) KH |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-07-11 : 09:48:38
|
| I am not sure what you want to do?Are you going to insert data into both products and Delivery tables?If you are inserting in Delivery table only, it's just a simple Insert query !Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-07-11 : 09:49:56
|
| You need to insert data in two tables seperately if neccessaryMadhivananFailing to plan is Planning to fail |
 |
|
|
websyd
Starting Member
16 Posts |
Posted - 2006-07-11 : 10:10:42
|
| each time a new consignment comes in to the warehouse the user has to insert records to show the goods recieved. i hav a drop downlist the reads the name of the products stored in the database this means i dont need to insert products again but i need to insert the quanties of this products into the delivary table |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-07-11 : 10:14:30
|
in this case just insert into the delivery tableexampleinsert into Delivery (DeliveryId, QuantityReceived, ProductId)values (1234, 100, 1) KH |
 |
|
|
|
|
|