I’m creating a (part of my) database which needs a junctionTable. The intention is to have a junction Table which makes every single row in tAssignment unique. Two fields in tAssignment refer to other tables, tCampaign and tProspect. The field assignmentID should be of type autovalue and will be referred to from the tEffort table, which is meant to record all activities within the campaign for a certain prospect.
The attached sketch shows the situation.
(Graph changed because of a wrong path)
However, no matter what I try, I cannot get these three INTEGER fields to become one primary key. The error message when saving the table reads
Attempt to define a second primary key in statement [CREATE TABLE "tAssignment" ("assignmentId" INTEGER NOT NULL IDENTITY,"campaignRef" INTEGER NOT NULL,"prospectRef" INTEGER NOT NULL, PRIMARY KEY ("assignmentId","campaignRef","prospectRef")]
and after hours of tweaking and studying other people’s work with LO, I’m left clueless about this.
Question:
How do I create a composite primary key from three INTEGER fields?
Thanks a lot in advance,
Norbert
Version: 24.2.5.2 (X86_64) / LibreOffice Community
Build ID: bffef4ea93e59bebbeaf7f431bb02b1a39ee8a59
CPU threads: 8; OS: macOS 11.7.10; UI render: Skia/Raster; VCL: osx
Locale: de-AT (de_AT.UTF-8); UI: en-US
Calc: threaded