0 votes

I'm trying to insert rows in the table DOCU_PROD using an external program. So I'm not able to use Efficy-functions.

All columns are quite logical, but I'm not sure how to determine the content of K_RELATION? Can I just define a random value? Or is it (as the name of the column suggests) a relation to another table? As far as I have seen the values do not need to be unique.

Edit: I tried to set KRELATION = 0. But when trying to edit the document afterwards it results in the following error: Vind detail met sleutel "97" en relatie "612593356" niet terug
so somehow there must be a logical way to deterime K
RELATION. Does someone know?

asked in Database by (219 points)
edited by

1 Answer

+2 votes
Best answer

Although we don't recommend to insert data directly with SQL inserts, in some cases it could give maximum performance.

The K_RELATION should not be unique in the table, just the combination of the two key fields + K_RELATION needs to be unique. Use a positive integer value.

answered by (7.2k points)
selected by
But where can I find the value of what K_RELATION should be?
As far as I have seen it is not simply a combination of the document-key with the product-key?
You can give it any value you want, as long as it is a positive integer.
Perfect, now I get what you meant. Thanks for your help!
1,225 questions
1,493 answers
1,828 comments
328 users