General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>>>Actually I want to use codes to EDIT sale invoice
>>>
>>>current sale invoice is as follows
>>>
>>>vou_no--code---Product---qty---rate--Amount
>>>---1-------1401----Apple------10----15----150
>>>---1-------1402----mango-----20----15----300
>>>
>>>
>>>Now I want to edit current invoice as
>>>
>>>vou_no--code---Product---qty---rate--Amount
>>>---1-------1401----Apple------10----17----170
>>>---1-------1403----Banana----30----22----660
>>>
>>>After editing, I delete current invoice and insert new one on its place with same vou_no.
>>
>>What is the Primary Key column in the Invoice table? Why do you need to delete and insert instead of simply using UPDATE command?
>
>There is no Primary key becuase this is a products detail table and every product have vou_no reference like this
>
>vou_no--code---Product---qty---rate--Amount
>---1-------1401----Apple------10----17----170
>---1-------1403----Banana----30----22----6
If no PK than either change your table or if you have problems with that show us how you have constructed that ProductDetailTable, maybe we can assist to extend your table with a PK
Regards,
Koen
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only