Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Begin Transaction
Message
From
29/09/2016 06:02:10
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 7
Network:
Windows XP
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01641395
Message ID:
01641481
Views:
32
>>>Code column seems to identify the product, I think it can be used as PK.
>>
>>A sales invoice might have product codes more than once.
>>So code column can not be used as primary key.
>
>So, what is the key - the invoice_no, product code + date ?

I think no,
Please imagine what will be the primary key if table has data like this

vou_no--code---Product---qty---rate--Amount
---1-------1401----Apple------10----15----150
---1-------1402----mango-----20----15----300
---1-------1401----Apple------10----12----120
---1-------1401----Apple------12----16----180
---1-------1402----mango-----20----13----260

code 1401 was used 3 times due to different rates
code 1402 was used 2 times due to different rates

In this situation, is there any chance to create ID?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform