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 |
Exir
Posting Yak Master
151 Posts |
Posted - 2013-04-05 : 15:58:43
|
HII want to design a database which saves invoices , each invoice havesome rows of objects and the number of rows are indeterminate the problem is the ID for each invoices. is it possible in sql to save ID for invoices automatically or i should insert manually ?example :invoiceID - ObjectID - objectName 1- 1 - apple1- 2 -orange1- 3 - banana2- 1 - bag2- 2 - shoe2- 3 - trousers 2- 4 - skirt2- 5 - glasses3- 1 - bicycle |
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2013-04-05 : 17:42:27
|
I think you should have two tables:invoice - PK is (InvoiceID)Lineitem - PK is (Invoiceid, ObjectID)Be One with the OptimizerTG |
|
|
|
|
|