Integrity constraint violation - no parent SYS_FK_194 table: Student

Discuss the database features
Post Reply
latoureiffel44
Posts: 2
Joined: Thu Jan 30, 2025 11:40 am

Integrity constraint violation - no parent SYS_FK_194 table: Student

Post by latoureiffel44 »

I am trying to update a database with SQL code that I have used many times:

UPDATE "Student" SET "Current Class" = "Current Class"+1 WHERE "Termination Date" IS NULL AND "Repetition" = FALSE

This code was working just a couple days ago. It's supposed to update all the students to the next class according to certain parameters. When I try to run the code now I get this error:

Integrity constraint violation - no parent SYS_FK_194 table: Student

I have tried running the code on previous versions of the same database but still get similar errors.
I updated to the most recent version of LibreOffice and am running version 24.8.4.2 on Windows 11 operating system.

Thank you for the help!
LibreOffice 7.5.2.2 ; Windows 11
UnklDonald418
Volunteer
Posts: 1566
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Integrity constraint violation - no parent SYS_FK_194 table: Student

Post by UnklDonald418 »

Perhaps one of the fields in table: Student contains an incorrect value, possibly a link to a record in another table but that record doesn't exist.
Open table: Student in the Edit Mode
From the menu select Tools>Indexes
Select SYS_FK_194
That should give you a hint as to which field contains for the problematic value.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
latoureiffel44
Posts: 2
Joined: Thu Jan 30, 2025 11:40 am

Re: Integrity constraint violation - no parent SYS_FK_194 table: Student

Post by latoureiffel44 »

Thank you so much. Yes, there is no SYS_FK_194. Only SYS_FK_195 which is the primary key. How can i fix this?
LibreOffice 7.5.2.2 ; Windows 11
UnklDonald418
Volunteer
Posts: 1566
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Integrity constraint violation - no parent SYS_FK_194 table: Student

Post by UnklDonald418 »

The error message indicates that SYS_FK_194 exists somewhere in your database. If not in the Students table then check your other tables in the same manner.
I'm not sure how much further help we can provide without a sample of your database
How to attach a document here
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
User avatar
Villeroy
Volunteer
Posts: 31345
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Integrity constraint violation - no parent SYS_FK_194 table: Student

Post by Villeroy »

Code: Select all

UPDATE "Student" SET "Current Class" = "Current Class"+1 WHERE "Termination Date" IS NULL AND "Repetition" = FALSE
"Current Class"+1 has no such entry in the table of classes.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply