Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Referential Integrity Constraint related issue

Rajneesh S-OracleJun 8 2020 — edited Jun 9 2020

Hello Experts,

I have referential integrity constraint between 2 tables like below:

CONSTRAINT "O_CLAIM_MESSAGE_F1" FOREIGN KEY ("CLAIM_CODE", "CLAIM_VERSION", "CLAIM_LINE_SEQUENCE")

REFERENCES "OHA_OIL"."O_CLAIM_LINE" ("CLAIM_CODE", "CLAIM_VERSION", "CLAIM_LINE_SEQUENCE") ENABLE

However I am still able to insert a new record into O_CLAIM_MESSAGE table without a respective entry at parent table O_CLAIM_LINE.

In fact my entire ETL load completed without FK failure.

However I have 300 records in O_CLAIM_MESSAGE which does not exist at O_CLAIM_LINE at all.

I did minus like this to find missing records at parent table:

select claim_code, claim_version, claim_line_sequence from oha_oil.O_CLAIM_MESSAGE

minus

select claim_code, claim_version, claim_line_sequence from oha_oil.O_CLAIM_line

It looks like referential integrity is disabled or deferred , though enabled at table DDL?

select constraint_name, table_name, r_constraint_name , delete_rule, status, deferrable, deferred, validated from all_constraints where table_name ='O_CLAIM_MESSAGE'

and constraint_name='O_CLAIM_MESSAGE_F1'

pastedImage_0.png

This post has been answered by Jonathan Lewis on Jun 8 2020
Jump to Answer

Comments

gimbal2
Lol, you're trying to run 'java.exe' aren't you? Perhaps you should start at the beginning - with a book!
EJP
When I try to use it, I get a DOS window that pops up for an instant then disappears - then nothing else happens
That's what it's supposed to do. Your expectations are misplaced. What were you expecting? and why?
955403
How do I open a session in order to write JAVA code? What do I need to download then?
gimbal2
952400 wrote:
How do I open a session in order to write JAVA code? What do I need to download then?
A text editor. You did not download Visual Studio or something, you only have the tools to be able to compile and run stuff. Command line tools. Java is freedom and thus requires intelligence and reasoning to be able to use it properly, nobody is going to hold your hand and tell you what to use and how to do things. Its all up to you to discover that through reading, studying and experimentation. If that is not your thing you may want to consider switching to .NET.

There are also Integrated Development Environments (IDE) which are more complete, of which the most popular ones are Netbeans and Eclipse. You'll have to try them out to see which one you like more. But I would start with some basic research so you stop making wrong assumptions.
955403
Gimbal2 - Thank you for your time and trouble, and I will make one final stab at this: If I had wished to create a Word document, then I would open an MS Word session, type my sentences, and save the document. Likewise, I wish to open a Java session, type my logic, save it, compile it then execute it. It seems to me to be the most basic of requirements – or am I asking for too much?
EJP
You're asking for things that don't exist in the Java distribution, and you are just reiterating your erroneous assumptions instead of trying to learn from the very full reply you got from gimbal2.
955403
ok, thank you.
gimbal2
952400 wrote:
Gimbal2 - Thank you for your time and trouble, and I will make one final stab at this: If I had wished to create a Word document, then I would open an MS Word session, type my sentences, and save the document. Likewise, I wish to open a Java session, type my logic, save it, compile it then execute it. It seems to me to be the most basic of requirements – or am I asking for too much?
Its funny how you bring up Microsoft stuff as an example :) Really, Microsoft .NET with Microsoft Visual Studio. I have this 'feeling' that that's where you belong and you will thrive.

But yeah Eclipse or Netbeans when you want to "go Java". Like I already mentioned.
1 - 8

Post Details

Added on Jun 8 2020
10 comments
779 views