Editor: Update 2 tables with composite keys

Editor: Update 2 tables with composite keys

tenretnitenretni Posts: 3Questions: 1Answers: 0

Hi,
I need to update two tables linked by left join. In the 2nd table, however, there are 2 composite columns which I only get answered with an error message when updating.
How could I update the 2 tables if I have 2 composite keys?
This would be the update routine in MS-SQL.
UPDATE [order_proposal_item] SET [customer_article_no] = '45453608', [customer_description] = 'test 123', [quantity] = '99' WHERE [order_proposal_id] = '189' AND [customer_article_no] = '45453608'

Many thanks for every support.
Kind regards,
Erich

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin
    Answer ✓

    Hi Erich,

    I'm sorry to say that is not something that Editor currently supports. If your routine supports insert, update and delete (I don't actually know if a single routine can do that in MSSQL!) then it would be possible as it would appear to Editor as if it were just writing to a single table and any complexity about multiple tables and how to split the data could be done in the routine.

    Allan

  • tenretnitenretni Posts: 3Questions: 1Answers: 0

    Hi Allan,
    thanks for your answer. I understand the complexity. I will find another solution. Maybe I change the table content and make a grouping of my data. This means that you have to open the main record first so that you can edit the linked records then.
    Or I have to discuss with my database administrator to change the database schema. :wink:

This discussion has been closed.