Solved

Orcle 10g SQL fails with 11g

Posted on 2010-11-29
85
1,121 Views
Last Modified: 2012-05-10
Hi

The sql below will run with an Oracle 10g database, but in the same version of SQL Developer connected to an 11g r1 database it gixes an ORA-00904 error on the "LPA_L2"."INITIAL_LIKELIHOOD_ID". Removing ALL aliases does not solve the error.

SELECT (SELECT "LPA_L4"."RiskLevel"
FROM
(SELECT "LPA_L5"."RISK_COLOUR" AS "RiskColour",
  "LPA_L5"."RISK_LEVEL" AS "RiskLevel",
  "LPA_L5"."RISK_LEVEL_ABBREVIATION" AS "RiskLevelAbbreviation",
  "LPA_L5"."RISK_LEVEL_ID" AS "RiskLevelID",
  "LPA_L5"."STATUS" AS "Status"
FROM
( "AQD"."RM_RISK_LEVEL" "LPA_L5"
INNER JOIN
"AQD"."RM_RISK_MATRIX" "LPA_L6"  ON  "LPA_L5"."RISK_LEVEL_ID"="LPA_L6"."RISK_LEVEL_ID")
WHERE
( ( ( ( ( "LPA_L6"."SEVERITY_ID" = "LPA_L2"."INITIAL_SEVERITY_ID") AND ( "LPA_L6"."LIKELIHOOD_ID" = "LPA_L2"."INITIAL_LIKELIHOOD_ID"))))) AND rownum <= 1) "LPA_L4"
WHERE
rownum <= 1) AS "LPFA_1"
FROM
( "AQD"."RM_RISK" "LPA_L1"
LEFT JOIN
"AQD"."RM_RISK_LIKELIHOOD_SEVERITY" "LPA_L2"  ON  "LPA_L1"."RISK_NO"="LPA_L2"."RISK_NO")
0
Comment
Question by:Kelvin Sparks
  • 46
  • 24
  • 14
85 Comments
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 34236098
is it the same query which works in 10g without any modifications is not working in 11g ?
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 34236110
as we know the error means the below....

ORA-00904: string: invalid identifier
Cause: The column name entered is either missing or invalid.
Action: Enter a valid column name. A valid column name must begin with a letter, be less than or equal to 30 characters, and consist of only alphanumeric characters and the special characters $, _, and #. If it contains other characters, then it must be enclosed in double quotation marks. It may not be a reserved word.  
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 34236123
Since i do not have your table, i am using the below example to explain the cause of the error. Your sql is of the below form...

select ( select object_name
      from ( select *
     from dba_objects x  where  rownum = 1 and x.owner = l2.owner  ) y
     where y.owner= l2.owner )
from dba_tables l2  ; --> this one does not work and gives the same error which you get.

select ( select y.object_name
      from ( select *
     from dba_objects x  where  rownum = 1  ) y
     where y.owner= l2.owner )
from dba_tables l2 ; --> this one works because i am not referencing in the inner sub query in the select list.

Explanation for the query which is not working :

select ( select object_name
      from ( select *
     from dba_objects x  where  rownum = 1 and x.owner = l2.owner  ) y  --> level 2 sub query
     where y.owner= l2.owner ) --> level 1 sub query
from dba_tables l2 ; --> this sql is giving the same error which you get because we are trying to reference the L2 aliased columns in the level 2 sub query and the l2 columns are not visible to the query there.  But the L2 aliased columns are visible in the level 1 sub query.

May be you need to rewrite the query to resolve this.
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 34236140
The exact error message returns
Error at Command Line:11 Column:127
Error report:
SQL Error: ORA-00904: "AQD"."RM_RISK_LIKELIHOOD_SEVERITY"."INITIAL_LIKELIHOOD_ID": invalid identifier
00904. 00000 -  "%s: invalid identifier"
*Cause:    
*Action:

Given that using DBSolo and doing a schema compare, the table design of both sets of tables is EXACTLY the same. There is no difference at all

Kelvin
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 34236165
you are running it in sqlplus or toad or where ? to get that error.
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 34236171
Can you give me your table structure for this table "AQD"."RM_RISK_LIKELIHOOD_SEVERITY" ? I would like to see whether it has this column.

Did you understand the feedback i gave you already in my previous posts ? Also i asked you few things in those pots but you are yet to reply/confirm for them. If you do not agree to what i have posted, please give a shout and only then the exact issue will become clear.

Thanks
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 34236225
I am using SQL Developer v2.1.1.64 with connections to 10g and 11g servers. I can connect to the 10 g server database and run code OK, then copy and paste into a new window connected to an 11g copy and it errors - we have thre copies of the 11g - all three report the same error. The table is bleow - as I said - I've done a schema compare and there are no differences


RISK_NO      VARCHAR2(9 CHAR)      No            1      
BUSINESS_UNIT_AFFECTED_ID      NUMBER(10,0)      No            2      
INITIAL_SEVERITY_ID      NUMBER(10,0)      Yes            3      
INITIAL_LIKELIHOOD_ID      NUMBER(10,0)      Yes            4      
RESIDUAL_SEVERITY_ID      NUMBER(10,0)      Yes            5      
RESIDUAL_LIKELIHOOD_ID      NUMBER(10,0)      Yes            6      
ENTERED_BY      NUMBER(10,0)      Yes            7      
ENTERED_ON      DATE      Yes            8      
PUBLISH      NUMBER(5,0)      No      (-1)       9      
UPDATED_BY      NUMBER(10,0)      Yes            10      
UPDATED_ON      DATE      Yes            11      
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 34236237
just to narrow down whether it is SQL Developer v2.1.1.64 issue with respect to 11g, can you try to test the query both in 10g / 11g in sqlplus and let me know if that works.

Thanks
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 34236254
Testing in SQL Developer as it initially failed in a dot net app (again works in 10g, but not in any 11g database
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 34236262
Have also run it in query window of DBSolo against all databases with the same result.
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 34236271
what is query window and DBSolo ? i don't know what these are ?

Do you have sql*plus ? did you try in this ?
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 34236281
No don't use SQL PLus - DBSolo is a third party app that can read/script etc databases and also execute SQL. A bit like SQL Developer but with extra bells on.
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 34236289
I am finishing for the day (is 6 pm NZ time and building is about to be locked). Will loook again in the morning. Thanks for help so far
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 34236291
I think it is difficult for me to understand whether it is an issue with sql developer with 11g or DBSolo with 11g here...

I would say we can validate this if you try to execute this in sqlplus for 10g and 11g. By the way, when you install database, you get sqlplus as well right ?

Thanks
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 34236294
fine with me. bye.
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34238464
Using double quotes in Oracle forces case sensitivity on objects.  For grins, try removing the double quotes and see if it runs.
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 34241537
Removing quotes does not work - same error. Romoving aliases and replacing with schema.tablename also produces that same error.
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34241785
Try this:

select INITIAL_LIKELIHOOD_ID from AQD.RM_RISK_LIKELIHOOD_SEVERITY where rownum=1;
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 34242886
OK, have simplified the query to the simplest form that still errors. it is
SELECT
(SELECT RISK_LEVEL
FROM
    (SELECT RISK_LEVEL
    FROM ( AQD.RM_RISK_LEVEL
    INNER JOIN AQD.RM_RISK_MATRIX
    ON AQD.RM_RISK_LEVEL.RISK_LEVEL_ID     =AQD.RM_RISK_MATRIX.RISK_LEVEL_ID)
    WHERE AQD.RM_RISK_MATRIX.LIKELIHOOD_ID = AQD.RM_RISK_LIKELIHOOD_SEVERITY.INITIAL_LIKELIHOOD_ID
))
FROM AQD.RM_RISK
LEFT JOIN AQD.RM_RISK_LIKELIHOOD_SEVERITY
ON AQD.RM_RISK.RISK_NO=AQD.RM_RISK_LIKELIHOOD_SEVERITY.RISK_NO
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34242894
The simplest for is what I posted in http:#34241785.  Can you run that for us?
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 34243197
In 10g we get a 1 back (correct value) in 11g we get a NULL (again correct value)
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34243703
When you run your simplified form, do you still get the invalid identifier on AQD.RM_RISK_LIKELIHOOD_SEVERITY.INITIAL_LIKELIHOOD_ID?
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 34243957
select INITIAL_LIKELIHOOD_ID from AQD.RM_RISK_LIKELIHOOD_SEVERITY where rownum=1;  

--> In 10g we get a 1 back (correct value) in 11g we get a NULL (again correct value) . This is the answer for the above which means this is working fine.

By the way, did you test in sqlplus as i do not want to trust any third party tool / utility ?

Thanks
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 34355502
Ok, sorry for the delay. Have to get a new release out. Since last post the database installation has been upgrades from 11.1.0.6 to 11.1.0.7. This has not solved the problem. Today I ran it using SQLPLUS - same error occurs.

Kelvin
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 34357483
sorry to bother.

Can you run the below 2 queries in both the databases ( from sql*plus ) and provide output with screenshots for each one.

1) select INITIAL_LIKELIHOOD_ID from AQD.RM_RISK_LIKELIHOOD_SEVERITY where rownum=1;  

2) the complete query but just to get 5 records to see what it returns.

select *
from (
SELECT (SELECT "LPA_L4"."RiskLevel"
FROM
(SELECT "LPA_L5"."RISK_COLOUR" AS "RiskColour",
  "LPA_L5"."RISK_LEVEL" AS "RiskLevel",
  "LPA_L5"."RISK_LEVEL_ABBREVIATION" AS "RiskLevelAbbreviation",
  "LPA_L5"."RISK_LEVEL_ID" AS "RiskLevelID",
  "LPA_L5"."STATUS" AS "Status"
FROM
( "AQD"."RM_RISK_LEVEL" "LPA_L5"
INNER JOIN
"AQD"."RM_RISK_MATRIX" "LPA_L6"  ON  "LPA_L5"."RISK_LEVEL_ID"="LPA_L6"."RISK_LEVEL_ID")
WHERE
( ( ( ( ( "LPA_L6"."SEVERITY_ID" = "LPA_L2"."INITIAL_SEVERITY_ID") AND ( "LPA_L6"."LIKELIHOOD_ID" = "LPA_L2"."INITIAL_LIKELIHOOD_ID"))))) AND rownum <= 1) "LPA_L4"
WHERE
rownum <= 1) AS "LPFA_1"
FROM
( "AQD"."RM_RISK" "LPA_L1"
LEFT JOIN
"AQD"."RM_RISK_LIKELIHOOD_SEVERITY" "LPA_L2"  ON  "LPA_L1"."RISK_NO"="LPA_L2"."RISK_NO")
) where rownum <=5
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34360175
Are you getting the ORA-00904 or null results?

null results pretty much has to be data missing between the two databases.
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 34445233
No, is always that ORA-00904 error. I will come back late next week on this - is holiday season here at the moment
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34445657
Holidays in most places.

Just let us know when you want to start again.
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 34865678
Hi guys, this hasn't gone to sleep, but bosses have put this on ice for a couple of more weeks. We will be coming back to this within a month
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 34867673
will await to get your testing feedback
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35076213
Hi, just getting back to Oracle side of things after gwetting another SQL Server release out. I note changes to SQL standards from patch 7 of Oracle 10.2 - not that this helps with this problem
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 35078590
can you provide me the outputs as requested in the update 34357483 if you need any further assistance from me.

Thanks
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35078944
Will do in the next few weeks
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 35079307
fine with me.
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35482196
Still wanting to get back to this, another project has taken precedence, and will do for next few weeks. Comment added to keep question alive.

Kelvin
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35828654
Hi Guys,

I'm finally back onto this. A bit more background - the SQL is generted fromn a product called LLBL which is the data layer between a dot Net app and the database. The fronnt end may be connected to a SQL Server db  or  an Oracle db depending on the client site. I have two Oracle dbs setup on vm's (both Win Server 2003) One has Oracle 10.2.0.7, the Other Oracle 11.2. The databaseshave been created using the same scripts, and populated with the same data scripts (All run through SQL DEveloper (64 bit). These are two new dbs set up since I opened the question.

I can confirm that the Oracle 10 still returns records and Oracle 11 doesn't.

I'm about to head back through the question thread to see what was asked and to try that. Will report back in shortly

0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35828679
First question that was asked
select INITIAL_LIKELIHOOD_ID from AQD.RM_RISK_LIKELIHOOD_SEVERITY where rownum=1;

Result
In both cases result was 4

K
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35828708
On mobile and scanned all the previous comments but didn't that select fail in the 11g try before?  If it works now, is there still an issue?
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35828809
Results of the SQL Run in SQL PLus for both vm's - same problem
Document1.docx
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35828869
slightwv

The simple one line select always worked in both - I have now created two dbs from the same scripts to ensure that data and schema are the same. But the main SQL still fails - irrespective of what I use to run it
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35828883
I'll look back through this tomorrow when I get on a real computer (on mobile now).

The 904 almost has to be a synonym or permission issue.

If I read the error correctly, try the following from both:
Select count(INITIAL_LIKELIHOOD_ID) from LPA_L2;
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35829363
Interestingly, the issue in in this bit:
( ( ( ( ( "LPA_L6"."SEVERITY_ID" = "LPA_L2"."INITIAL_SEVERITY_ID") AND ( "LPA_L6"."LIKELIHOOD_ID" = "LPA_L2"."INITIAL_LIKELIHOOD_ID"))))) AND rownum <= 1) "LPA_L4"
If I reverse the order and run likelihood_ID comparison and then the SEVERITY_ID it is the severity_ID that returns the same error
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35832390
Sorry for that post on mobile last night.  Reading that thread on a tiny screen was confusing.

>>If I reverse the order and run likelihood_ID comparison and then the SEVERITY_ID it is the severity_ID that returns the same error

I also have to apologize for not seeing this until now.

You create the alias LPA_L2 outside the scope of the inline view LPFA_1.  You cannot reference those columns inside the LPFA_1 select.

Here's a simple example of what you are trying to do that shows the error.
select 'Hello' bob from
(
	select LPA_L2.bob from dual
) LPFA_1
,
dual LPA_L2
where LPFA_1.bob=LPA_L2.bob
/

Open in new window

0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35834722
OK, I sort of understand, but how is it that until Oracle 11, this would work. It was OK with Oracle 10.2.0.6 and 10.2.0.7, but not in 11.1 or 11.2.

What is the change between the versions that would result in this? I cannot find any documented changes that could explain it.


Kelvin
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35834845
Good point I forgot about the 10g works and 11g doesn't aspect of the question.  There have been pretty obscure 'features' fixed between versions that cause things that used to work to all of a sudden fail.

The simple example I provided fails in 10g.  Can you try that example on your 10g?

If I read the logic of the SQL you posted, I believe the simple example mimics it.

If you can provide something I can run on my end I can that fails for your 10g and runs on your 11g, I'll gladly try to reproduce it on my end.
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35835262
OK, there are 4 tables used in this SQL, all small. Here are scripts that will create and populate them with what I have been using. You may choose not to use our schema and leave out all the RI stuff.

I'd be very interested to get either the reason it is failing, or a view that produces the same result using 11g.  
AQD.RM-RISK.sql
AQD.RM-RISK-LEVEL.sql
AQD.RM-RISK-LIKELIHOOD-SEVERITY.sql
AQD.RM-RISK-MATRIX.sql
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35835725
Here's where I am right now:

Missing the table def for RM_RISK.

Are the triggers necessary or can I ignore them?  The appear to reference other tables.
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35835775
I think you can ignore triggers, FK's etc. Apologies for the missing table defs - stupid toll I used. Attached here
AQD.RM-RISK.sql
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35835878
>>stupid toll I used. Attached here

lol... no problem.  That was a lot to get ready.

I cannot test on 11g until I get back to the office tomorrow.  I only have 10gXE at home (10.2.0.1) on Windows ME.

Now you want the bad news?

I'm not sure why this is running on your 10g system. If you aren't on Windows, it may be an OS specific 'feature'?

Using the single script I created using the code you posted, I get the 904.

Can you create a junk user on your system and run the script I posted?  I removed the schema (I think I got them all).

( ( ( ( ( LPA_L6.SEVERITY_ID = LPA_L2.INITIAL_SEVERITY_ID) AND ( LPA_L6.LIKELIHOOD_ID = LPA_L2.INITIAL_LIKELIHOOD_ID))))) AND rownum <= 1) LPA_L4
                                                                                        *
ERROR at line 13:
ORA-00904: "LPA_L2"."INITIAL_LIKELIHOOD_ID": invalid identifier

set define off
spool l
--  drop TABLE RM_RISK  purge;
--  drop TABLE RM_RISK_LIKELIHOOD_SEVERITY  purge;
--  drop TABLE RM_RISK_MATRIX purge;
--  drop TABLE RM_RISK_LEVEL  purge;
  drop sequence RM_RISK_LEVEL_ID;
  create sequence RM_RISK_LEVEL_ID;

--------------------------------------------------------
--  File created - Thursday-May-26-2011   
--------------------------------------------------------
--------------------------------------------------------
--  DDL for Table RM_RISK_LEVEL
--------------------------------------------------------


  CREATE TABLE RM_RISK_LEVEL 
   (	RISK_LEVEL_ID NUMBER(10,0), 
	RISK_LEVEL VARCHAR2(50 CHAR), 
	RISK_COLOUR VARCHAR2(6 CHAR), 
	STATUS NUMBER(5,0) DEFAULT (-1), 
	RISK_LEVEL_ABBREVIATION VARCHAR2(5 CHAR)
);
REM INSERTING into RM_RISK_LEVEL
Insert into RM_RISK_LEVEL (RISK_LEVEL_ID,RISK_LEVEL,RISK_COLOUR,STATUS,RISK_LEVEL_ABBREVIATION) values (1,'Acceptable','008000',-1,null);
Insert into RM_RISK_LEVEL (RISK_LEVEL_ID,RISK_LEVEL,RISK_COLOUR,STATUS,RISK_LEVEL_ABBREVIATION) values (2,'Undesirable','ffff00',-1,null);
Insert into RM_RISK_LEVEL (RISK_LEVEL_ID,RISK_LEVEL,RISK_COLOUR,STATUS,RISK_LEVEL_ABBREVIATION) values (3,'Unacceptable','ff0000',-1,null);
--------------------------------------------------------
--  DDL for Index PK_RISK_RISK_LEVEL
--------------------------------------------------------

  CREATE UNIQUE INDEX PK_RISK_RISK_LEVEL ON RM_RISK_LEVEL (RISK_LEVEL_ID) 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE USERS ;
--------------------------------------------------------
--  Constraints for Table RM_RISK_LEVEL
--------------------------------------------------------

  ALTER TABLE RM_RISK_LEVEL ADD CONSTRAINT PK_RISK_RISK_LEVEL PRIMARY KEY (RISK_LEVEL_ID)
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE USERS  ENABLE;
 
  ALTER TABLE RM_RISK_LEVEL MODIFY (RISK_LEVEL_ID NOT NULL ENABLE);
 
  ALTER TABLE RM_RISK_LEVEL MODIFY (RISK_LEVEL NOT NULL ENABLE);
 
  ALTER TABLE RM_RISK_LEVEL MODIFY (RISK_COLOUR NOT NULL ENABLE);
 
  ALTER TABLE RM_RISK_LEVEL MODIFY (STATUS NOT NULL ENABLE);



--------------------------------------------------------
--  File created - Thursday-May-26-2011   
--------------------------------------------------------
--------------------------------------------------------
--  DDL for Table RM_RISK_LIKELIHOOD_SEVERITY
--------------------------------------------------------

  CREATE TABLE RM_RISK_LIKELIHOOD_SEVERITY 
   (	RISK_NO VARCHAR2(9 CHAR), 
	BUSINESS_UNIT_AFFECTED_ID NUMBER(10,0), 
	INITIAL_SEVERITY_ID NUMBER(10,0), 
	INITIAL_LIKELIHOOD_ID NUMBER(10,0), 
	RESIDUAL_SEVERITY_ID NUMBER(10,0), 
	RESIDUAL_LIKELIHOOD_ID NUMBER(10,0), 
	ENTERED_BY NUMBER(10,0), 
	ENTERED_ON DATE, 
	PUBLISH NUMBER(5,0) DEFAULT (-1), 
	UPDATED_BY NUMBER(10,0), 
	UPDATED_ON DATE
);
REM INSERTING into RM_RISK_LIKELIHOOD_SEVERITY
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R12-10',70,5,4,2,2,147,to_date('09/02/10','DD/MM/RR'),-1,147,to_date('24/02/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R12-10',71,null,null,null,null,147,to_date('04/02/10','DD/MM/RR'),-1,147,to_date('24/02/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R13-10',120,null,null,null,null,147,to_date('04/02/10','DD/MM/RR'),-1,147,to_date('04/02/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R2-09',2,4,2,1,2,147,to_date('11/12/09','DD/MM/RR'),-1,147,to_date('20/12/09','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R2-09',71,3,4,2,2,147,to_date('10/12/09','DD/MM/RR'),-1,147,to_date('20/12/09','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R26-10',2,null,null,null,null,124,to_date('02/03/10','DD/MM/RR'),-1,124,to_date('04/03/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R3-09',71,null,null,null,null,124,to_date('10/12/09','DD/MM/RR'),-1,null,null);
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R30-10',159,3,4,2,4,153,to_date('05/03/10','DD/MM/RR'),-1,162,to_date('05/03/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R33-10',160,3,3,1,3,153,to_date('05/03/10','DD/MM/RR'),-1,170,to_date('07/07/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R34-10',160,4,3,1,3,153,to_date('05/03/10','DD/MM/RR'),0,162,to_date('04/05/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R37-10',160,3,3,null,null,163,to_date('05/03/10','DD/MM/RR'),-1,162,to_date('05/03/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R4-09',2,3,4,2,2,124,to_date('11/12/09','DD/MM/RR'),-1,147,to_date('10/01/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R4-09',120,null,null,null,null,124,to_date('17/12/09','DD/MM/RR'),-1,147,to_date('10/01/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R40-10',2,null,null,null,null,null,null,-1,164,to_date('14/06/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R40-10',71,3,3,2,2,162,to_date('11/04/10','DD/MM/RR'),-1,164,to_date('14/06/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R41-10',71,4,4,4,2,162,to_date('11/04/10','DD/MM/RR'),-1,170,to_date('07/05/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R42-10',2,3,4,3,1,162,to_date('12/04/10','DD/MM/RR'),-1,170,to_date('07/05/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R43-10',2,3,5,3,2,162,to_date('12/04/10','DD/MM/RR'),-1,170,to_date('24/06/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R43-10',106,4,3,1,1,null,null,-1,170,to_date('24/06/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R44-10',2,4,4,4,1,162,to_date('12/04/10','DD/MM/RR'),-1,170,to_date('07/05/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R46-10',122,3,4,3,1,153,to_date('07/05/10','DD/MM/RR'),-1,170,to_date('07/05/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R47-10',160,4,4,3,1,null,null,-1,170,to_date('19/11/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R6-10',122,3,5,1,2,124,to_date('15/01/10','DD/MM/RR'),-1,124,to_date('15/01/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R7-10',2,3,3,1,1,147,to_date('18/01/10','DD/MM/RR'),-1,147,to_date('05/02/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R7-10',70,3,4,1,1,124,to_date('18/01/10','DD/MM/RR'),-1,147,to_date('05/02/10','DD/MM/RR'));
--------------------------------------------------------
--  DDL for Index PK_RM_RISK_LIKELIHOOD_CONSEQUE
--------------------------------------------------------

  CREATE UNIQUE INDEX PK_RM_RISK_LIKELIHOOD_CONSEQUE ON RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO, BUSINESS_UNIT_AFFECTED_ID) 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE USERS ;
--------------------------------------------------------
--  Constraints for Table RM_RISK_LIKELIHOOD_SEVERITY
--------------------------------------------------------

  ALTER TABLE RM_RISK_LIKELIHOOD_SEVERITY ADD CONSTRAINT PK_RM_RISK_LIKELIHOOD_CONSEQUE PRIMARY KEY (RISK_NO, BUSINESS_UNIT_AFFECTED_ID)
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE USERS  ENABLE;
 
  ALTER TABLE RM_RISK_LIKELIHOOD_SEVERITY MODIFY (RISK_NO NOT NULL ENABLE);
 
  ALTER TABLE RM_RISK_LIKELIHOOD_SEVERITY MODIFY (BUSINESS_UNIT_AFFECTED_ID NOT NULL ENABLE);
 
  ALTER TABLE RM_RISK_LIKELIHOOD_SEVERITY MODIFY (PUBLISH NOT NULL ENABLE);

--------------------------------------------------------
--  File created - Thursday-May-26-2011   
--------------------------------------------------------
--------------------------------------------------------
--  DDL for Table RM_RISK_MATRIX
--------------------------------------------------------

  CREATE TABLE RM_RISK_MATRIX 
   (	SEVERITY_ID NUMBER(10,0), 
	LIKELIHOOD_ID NUMBER(10,0), 
	RISK_LEVEL_ID NUMBER(10,0)
);
REM INSERTING into RM_RISK_MATRIX
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (1,1,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (1,2,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (1,3,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (1,4,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (1,5,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (2,1,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (2,2,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (2,3,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (2,4,2);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (2,5,2);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (3,1,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (3,2,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (3,3,2);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (3,4,2);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (3,5,3);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (4,1,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (4,2,2);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (4,3,2);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (4,4,3);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (4,5,3);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (5,1,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (5,2,2);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (5,3,3);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (5,4,3);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (5,5,3);
--------------------------------------------------------
--  DDL for Index PK_RM_RISK_MATRIX
--------------------------------------------------------

  CREATE UNIQUE INDEX PK_RM_RISK_MATRIX ON RM_RISK_MATRIX (SEVERITY_ID, LIKELIHOOD_ID) 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE USERS ;
--------------------------------------------------------
--  Constraints for Table RM_RISK_MATRIX
--------------------------------------------------------

  ALTER TABLE RM_RISK_MATRIX ADD CONSTRAINT PK_RM_RISK_MATRIX PRIMARY KEY (SEVERITY_ID, LIKELIHOOD_ID)
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE USERS  ENABLE;
 
  ALTER TABLE RM_RISK_MATRIX MODIFY (SEVERITY_ID NOT NULL ENABLE);
 
  ALTER TABLE RM_RISK_MATRIX MODIFY (LIKELIHOOD_ID NOT NULL ENABLE);
 
  ALTER TABLE RM_RISK_MATRIX MODIFY (RISK_LEVEL_ID NOT NULL ENABLE);




  CREATE TABLE RM_RISK 
   (	RISK_NO VARCHAR2(9 CHAR), 
	RISK_DESCRIPTION CLOB, 
	DATE_IDENTIFIED DATE, 
	BUSINESS_UNIT_AFFECTED_ID NUMBER(10,0), 
	EQUIPMENT_INVOLVED VARCHAR2(255 CHAR), 
	RISK_CATEGORY_ID NUMBER(10,0), 
	RISK_TYPE_ID NUMBER(10,0), 
	ENTERED_BY_ID NUMBER(10,0), 
	ENTERED_ON DATE, 
	POTENTIAL_CURRENT_ID NUMBER(10,0), 
	WR_PERIOD NUMBER(5,0), 
	WR_TYPE VARCHAR2(4 CHAR), 
	WR_NUMBER NUMBER(10,0), 
	HAZARD_NO VARCHAR2(9 CHAR), 
	OCCURRENCE_NO VARCHAR2(9 CHAR), 
	FINDING_NO VARCHAR2(9 CHAR), 
	LAST_REVIEWED_DATE DATE, 
	LAST_REVIEWED_BY_ID NUMBER(10,0), 
	NEXT_REVIEW_DATE DATE, 
	FEEDBACK VARCHAR2(2000 CHAR), 
	FEEDBACK_BY_ID NUMBER(10,0), 
	FEEDBACK_ENTERED_ON DATE, 
	RISK_STATUS_ID NUMBER(10,0) DEFAULT (1), 
	OVERAL_CONTROL_EFECTIVENES_ID NUMBER(10,0), 
	RISK_TREND_ID NUMBER(10,0), 
	RISK_OWNER VARCHAR2(50), 
	RISK_TREND_COMMENTARY VARCHAR2(2000), 
	RISK_TITLE VARCHAR2(100) DEFAULT 'Risk Title', 
	EVENTS_AND_DEVELOPMENTS VARCHAR2(4000)
   );

REM INSERTING into RM_RISK
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R12-10',to_date('04/02/10','DD/MM/RR'),71,'Catering Truck',4,5,147,to_date('04/02/10','DD/MM/RR'),1,null,null,null,null,null,null,to_date('09/02/10','DD/MM/RR'),147,to_date('28/02/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Objects falling from Truck',null);
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R13-10',to_date('04/02/10','DD/MM/RR'),120,'Catering Truck',9,null,147,to_date('04/02/10','DD/MM/RR'),null,null,null,null,null,null,null,to_date('04/02/10','DD/MM/RR'),147,to_date('28/02/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Goods falling off the Catering truck - no rail in place',null);
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R2-09',to_date('10/12/09','DD/MM/RR'),71,'Catering Vehicle',12,null,147,to_date('10/12/09','DD/MM/RR'),null,null,null,null,null,null,null,to_date('10/12/09','DD/MM/RR'),147,to_date('31/12/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Goods falling off the back of Catering Vehicles',null);
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R26-10',to_date('02/03/10','DD/MM/RR'),2,'People',40,null,124,to_date('02/03/10','DD/MM/RR'),null,null,null,null,null,null,null,to_date('04/03/10','DD/MM/RR'),124,null,null,null,null,3,null,null,null,null,'New route',null);
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R3-09',to_date('10/12/09','DD/MM/RR'),71,null,40,null,124,to_date('10/12/09','DD/MM/RR'),null,null,null,null,'H1-09',null,null,null,null,null,null,null,null,1,null,null,null,null,'Air Bridge - Hydraulic Forward Drive Failure',null);
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R30-10',to_date('03/03/10','DD/MM/RR'),159,null,null,7,153,to_date('05/03/10','DD/MM/RR'),2,null,null,null,null,null,null,to_date('05/03/10','DD/MM/RR'),162,to_date('10/03/10','DD/MM/RR'),null,null,null,3,53,58,'Peter Hunt',null,'Foreign Currency movement HKD against USD',null);
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R33-10',to_date('05/03/10','DD/MM/RR'),160,'Construction Vehicles 
',8,12,153,to_date('05/03/10','DD/MM/RR'),2,null,null,null,null,null,null,to_date('04/05/10','DD/MM/RR'),162,to_date('04/05/11','DD/MM/RR'),'Thank you for lodging your concern. 
This is now being processed and we will keep you updated.',163,to_date('05/03/10','DD/MM/RR'),3,53,57,'Eddie Rogan','The need for vigilance is extreme','Procedure deviation',null);
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R34-10',to_date('05/03/10','DD/MM/RR'),160,'Aircraft / construction vehicles',null,12,153,to_date('05/03/10','DD/MM/RR'),2,null,null,null,null,null,null,to_date('04/05/10','DD/MM/RR'),162,to_date('02/06/10','DD/MM/RR'),'Thanks but we''re not going to do anything with this.',162,to_date('04/05/10','DD/MM/RR'),3,53,57,'Julie Smith','Vigilance is required at all times especially during evenings early mornings when visual is not that great.  ','Conflict with crossing vehicle',null);
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R37-10',to_date('04/03/10','DD/MM/RR'),160,'Aircraft / Catering truck',40,null,163,to_date('05/03/10','DD/MM/RR'),null,null,null,null,null,'O3-10',null,to_date('05/03/10','DD/MM/RR'),163,to_date('10/03/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Conflict with ground vehicle',null);
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R4-09',to_date('11/12/09','DD/MM/RR'),2,'Cabin Crew & O/head bins',31,4,124,to_date('11/12/09','DD/MM/RR'),1,null,null,null,null,null,null,to_date('17/12/09','DD/MM/RR'),124,null,'Looking into!',null,null,3,null,null,null,null,'Placing baggage in O/head bins',null);
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R40-10',to_date('11/04/10','DD/MM/RR'),71,null,null,null,162,to_date('11/04/10','DD/MM/RR'),null,null,null,null,'H5-10',null,null,to_date('11/04/10','DD/MM/RR'),162,to_date('17/09/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'CFIT',null);
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R41-10',to_date('11/04/10','DD/MM/RR'),71,null,null,null,162,to_date('11/04/10','DD/MM/RR'),null,null,null,null,'H5-10',null,null,to_date('11/04/10','DD/MM/RR'),162,to_date('17/09/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Mid-air collision',null);
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R42-10',to_date('11/04/10','DD/MM/RR'),2,null,null,null,162,to_date('12/04/10','DD/MM/RR'),null,null,null,null,'H5-10',null,null,to_date('12/04/10','DD/MM/RR'),162,to_date('31/08/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Landing overrun after landing',null);
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R43-10',to_date('11/04/10','DD/MM/RR'),2,null,null,null,162,to_date('12/04/10','DD/MM/RR'),null,null,null,null,'H5-10',null,null,to_date('12/04/10','DD/MM/RR'),162,to_date('30/10/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Landing overrun following aborted take-off.',null);
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R44-10',to_date('11/04/10','DD/MM/RR'),2,null,null,null,162,to_date('12/04/10','DD/MM/RR'),null,null,null,null,'H5-10',null,null,to_date('12/04/10','DD/MM/RR'),162,to_date('23/09/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Bird Strike',null);
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R46-10',to_date('07/05/10','DD/MM/RR'),122,'Airbridge and Aircraft',40,12,153,to_date('07/05/10','DD/MM/RR'),2,null,null,null,'H6-10',null,null,to_date('07/05/10','DD/MM/RR'),170,to_date('07/05/11','DD/MM/RR'),null,null,null,3,54,57,'Bob Chambers','Reported occurrences of this event type have been on the increase since the introduction of these differently configured aircraft.','Adverse trend of Pax Door impacting the airbridge causing damage.  ',null);
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R47-10',to_date('19/11/10','DD/MM/RR'),160,null,null,null,170,to_date('19/11/10','DD/MM/RR'),null,null,null,null,null,null,'F7-10',to_date('19/11/10','DD/MM/RR'),170,to_date('23/11/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'passenger screening risk',null);
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R6-10',to_date('15/01/10','DD/MM/RR'),122,'Ramp Vans',39,11,124,to_date('15/01/10','DD/MM/RR'),2,null,null,null,null,null,null,to_date('15/01/10','DD/MM/RR'),124,to_date('22/01/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'No servicing requirement for ground vehicles',null);
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R7-10',to_date('18/01/10','DD/MM/RR'),70,'Access stand',2,12,124,to_date('18/01/10','DD/MM/RR'),2,null,null,null,null,null,null,to_date('12/02/10','DD/MM/RR'),147,to_date('12/02/10','DD/MM/RR'),'Who gets this?  ',147,to_date('18/01/10','DD/MM/RR'),3,null,null,null,null,'Overstretching and falling',null);

commit;


SELECT (SELECT LPA_L4.RiskLevel
FROM
(SELECT LPA_L5.RISK_COLOUR AS RiskColour,
  LPA_L5.RISK_LEVEL AS RiskLevel,
  LPA_L5.RISK_LEVEL_ABBREVIATION AS RiskLevelAbbreviation,
  LPA_L5.RISK_LEVEL_ID AS RiskLevelID,
  LPA_L5.STATUS AS Status
FROM
( RM_RISK_LEVEL LPA_L5
INNER JOIN
RM_RISK_MATRIX LPA_L6  ON  LPA_L5.RISK_LEVEL_ID=LPA_L6.RISK_LEVEL_ID)
WHERE
( ( ( ( ( LPA_L6.SEVERITY_ID = LPA_L2.INITIAL_SEVERITY_ID) AND ( LPA_L6.LIKELIHOOD_ID = LPA_L2.INITIAL_LIKELIHOOD_ID))))) AND rownum <= 1) LPA_L4
WHERE
rownum <= 1) AS LPFA_1
FROM
( RM_RISK LPA_L1
LEFT JOIN
RM_RISK_LIKELIHOOD_SEVERITY LPA_L2  ON  LPA_L1.RISK_NO=LPA_L2.RISK_NO)
/


spool off
set define on

Open in new window

0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35835916
Thanks. Setup here is database 10g and 11g are both running on vm's with Windows Server 2003. I have run the scripts on both of these machines using SQLPlus. Worked on 10g (patch 7), not on 11.2.

On PC, I have SQL Developer on a Win 7 Ultimate box. Currently 64 bit version of 3.0.4, but previously 2.?? (32 bit). I create connections to both servers. Again 10g works, 11g does not. WE have had a number of version of the databases in 10 and 11. The results are consistent. I'll create a blank db in each and have a go with your script.

We've done nothing special in the db installs, and use the std windows tools to create databases DCA??
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35835946
Can you try the single script I posted on your 10g?  I'm looking to get a common baseline we can both work from.

If it runs on your system and fails on mine, then we can dig deeper.

The worse news is it we think it is a bug, if you cannot reproduce it on a physical server (not in a VM), Oracle will not support you.

Also what exact versions of 10g?  need all 4 numbers:  select * from v$version;
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35836081
Hmmm, this is odd, as I'd patch from 10.2.0.6 to 10.2.0.7 but got this!
BANNER                                                          
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production                          
CORE     10.2.0.1.0             Production                                        
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production          
NLSRTL Version 10

0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35836087
11g is 11.2.0.1
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35836386
>>Hmmm, this is odd, as I'd patch from 10.2.0.6 to 10.2.0.7 but got this!

Not sure about that one.  Some patches do not update the banners in v$version but 10.2.0.7 should show something more than 10.2.0.1.  After you patched the software did you run catupgrd.sql to patch the data dictionary?

Anyway, 10.2.0.1 is what I used to get the error.  I don't see where you ran the script I posted?

If possible can you create a brand new user for the test so nothing else can possible interfere?
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35836388
Have yet to do the script for you
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35836550
Don't user is an issue. I was logged in as AQD (the xhema owner), but the issue was first detected with a run-ogf-the-mill user who had the standard grants - worked in 10g, not in11g
0
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 35836580
I'm trying to get us either reproducing the same error with the same scripts or not.

If you say you can run the script I posted as a brand new user in a 10.2 database on Windows there there is a bigger issue because it fails for me.  Then I'm probably going to go with Oracle's stance that it might be VM related.

If the script I posted fails for you with a new user with 10.2, then we need to see what is different between my script and your 'working' database.
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35836726
OK,
I created a new blank database on the vm (we don't have a dedicated Oracle server as we are not a production facility - just need many dev environments.

I created user test1 as dba

Logged on as test1, copied your script and ran it.

Result is

LPFA_1                                            
--------------------------------------------------
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        
Acceptable                                        

25 rows selected
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35836728
Can you please point me to anything on the oracle site that indicates a lack of support or known issues with using vms for the database
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35836748
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35836793
>>Logged on as test1, copied your script and ran it.

I'm not sure what is going on.  My XE 10.2.0.1 database fails.  I'll try tomorrow on my 10.2.0.3 Enterprise Windows database but really expect the same result.

>>Not sure I agree with vm comment

You can disagree all day long but I take Oracle's Support site over a UK article from 2004 from an author in Chicago.

I suggest you read the following note on Oracle's Support site:  Modified 08-NOV-2010

Support Position for Oracle Products Running on VMWare Virtualized Environments [ID 249212.1]



0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35836820
Happy to read that article, howver, I personally don't have a login to their support area. Any chance of a copy? I'd like to pass it onto my manager
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35836826
I should also add:  I'm running test and dev databases under Hyper-V.  I'm in close contact with my Oracle Account Team and know they use VMs.

99% of the time VMs don't come into play.  I just wouldn't ever run in Production on them because of that note.
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35836831
In our case, they are test and dev systems- using Hyper-V. We don't have a production system as we sell a syustem that can use either SQL-Server or Oracle as a database
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35836835
>>Any chance of a copy? I'd like to pass it onto my manager

I would love to however, since Oracle Support is a paid service, I'm unable to post their content.

It violates their license agreement and the user agreement of this sit posting copyrighted material.
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35836838
Fair enough. I think the organisation has a login, so will tell manager to try and find it
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35836854
Test and dev should be fine.  Like I said, it's what I use.  Oracle employees use VMs.  Oracle has published VMWare machines to demo RAC on Oracle Linux.

It's strictly a Support issue.  The Note explains why.  In a nutshell, it has to do with the hardware virtualization.

I'm done for the night.  I'll post what I find tomorrow on my test databases.
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35836861
Thanks very much for assistance
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35839694
Attached is a full run of what I posted last night with echo on so you can see each of the statements.  I added a select * from v$version at the top to confirm my version.

My 10.2.0.3 development database on Windows XP still fails with the 904.
SQL> 
SQL> select * from v$version;
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE	10.2.0.3.0	Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production

Elapsed: 00:00:00.01
SQL> 
SQL> --  drop TABLE RM_RISK  purge;
SQL> --  drop TABLE RM_RISK_LIKELIHOOD_SEVERITY  purge;
SQL> --  drop TABLE RM_RISK_MATRIX purge;
SQL> --  drop TABLE RM_RISK_LEVEL  purge;
SQL>   drop sequence RM_RISK_LEVEL_ID;

Sequence dropped.

Elapsed: 00:00:00.28
SQL>   create sequence RM_RISK_LEVEL_ID;

Sequence created.

Elapsed: 00:00:00.03
SQL> 
SQL> --------------------------------------------------------
SQL> --  File created - Thursday-May-26-2011
SQL> --------------------------------------------------------
SQL> --------------------------------------------------------
SQL> --  DDL for Table RM_RISK_LEVEL
SQL> --------------------------------------------------------
SQL> 
SQL> 
SQL>   CREATE TABLE RM_RISK_LEVEL
  2  	(    RISK_LEVEL_ID NUMBER(10,0),
  3  	     RISK_LEVEL VARCHAR2(50 CHAR),
  4  	     RISK_COLOUR VARCHAR2(6 CHAR),
  5  	     STATUS NUMBER(5,0) DEFAULT (-1),
  6  	     RISK_LEVEL_ABBREVIATION VARCHAR2(5 CHAR)
  7  );
  CREATE TABLE RM_RISK_LEVEL
               *
ERROR at line 1:
ORA-00955: name is already used by an existing object


Elapsed: 00:00:00.09
SQL> REM INSERTING into RM_RISK_LEVEL
SQL> Insert into RM_RISK_LEVEL (RISK_LEVEL_ID,RISK_LEVEL,RISK_COLOUR,STATUS,RISK_LEVEL_ABBREVIATION) values (1,'Acceptable','008000',-1,null);
Insert into RM_RISK_LEVEL (RISK_LEVEL_ID,RISK_LEVEL,RISK_COLOUR,STATUS,RISK_LEVEL_ABBREVIATION) values (1,'Acceptable','008000',-1,null)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RISK_RISK_LEVEL) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_LEVEL (RISK_LEVEL_ID,RISK_LEVEL,RISK_COLOUR,STATUS,RISK_LEVEL_ABBREVIATION) values (2,'Undesirable','ffff00',-1,null);
Insert into RM_RISK_LEVEL (RISK_LEVEL_ID,RISK_LEVEL,RISK_COLOUR,STATUS,RISK_LEVEL_ABBREVIATION) values (2,'Undesirable','ffff00',-1,null)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RISK_RISK_LEVEL) violated


Elapsed: 00:00:00.04
SQL> Insert into RM_RISK_LEVEL (RISK_LEVEL_ID,RISK_LEVEL,RISK_COLOUR,STATUS,RISK_LEVEL_ABBREVIATION) values (3,'Unacceptable','ff0000',-1,null);
Insert into RM_RISK_LEVEL (RISK_LEVEL_ID,RISK_LEVEL,RISK_COLOUR,STATUS,RISK_LEVEL_ABBREVIATION) values (3,'Unacceptable','ff0000',-1,null)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RISK_RISK_LEVEL) violated


Elapsed: 00:00:00.03
SQL> --------------------------------------------------------
SQL> --  DDL for Index PK_RISK_RISK_LEVEL
SQL> --------------------------------------------------------
SQL> 
SQL>   CREATE UNIQUE INDEX PK_RISK_RISK_LEVEL ON RM_RISK_LEVEL (RISK_LEVEL_ID)
  2    PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  3    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  4    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  5    TABLESPACE USERS ;
  CREATE UNIQUE INDEX PK_RISK_RISK_LEVEL ON RM_RISK_LEVEL (RISK_LEVEL_ID)
                      *
ERROR at line 1:
ORA-00955: name is already used by an existing object


Elapsed: 00:00:00.01
SQL> --------------------------------------------------------
SQL> --  Constraints for Table RM_RISK_LEVEL
SQL> --------------------------------------------------------
SQL> 
SQL>   ALTER TABLE RM_RISK_LEVEL ADD CONSTRAINT PK_RISK_RISK_LEVEL PRIMARY KEY (RISK_LEVEL_ID)
  2    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  3    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  4    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  5    TABLESPACE USERS  ENABLE;
  ALTER TABLE RM_RISK_LEVEL ADD CONSTRAINT PK_RISK_RISK_LEVEL PRIMARY KEY (RISK_LEVEL_ID)
                                                              *
ERROR at line 1:
ORA-02260: table can have only one primary key


Elapsed: 00:00:00.03
SQL> 
SQL>   ALTER TABLE RM_RISK_LEVEL MODIFY (RISK_LEVEL_ID NOT NULL ENABLE);
  ALTER TABLE RM_RISK_LEVEL MODIFY (RISK_LEVEL_ID NOT NULL ENABLE)
                                    *
ERROR at line 1:
ORA-01442: column to be modified to NOT NULL is already NOT NULL


Elapsed: 00:00:00.01
SQL> 
SQL>   ALTER TABLE RM_RISK_LEVEL MODIFY (RISK_LEVEL NOT NULL ENABLE);
  ALTER TABLE RM_RISK_LEVEL MODIFY (RISK_LEVEL NOT NULL ENABLE)
                                    *
ERROR at line 1:
ORA-01442: column to be modified to NOT NULL is already NOT NULL


Elapsed: 00:00:00.01
SQL> 
SQL>   ALTER TABLE RM_RISK_LEVEL MODIFY (RISK_COLOUR NOT NULL ENABLE);
  ALTER TABLE RM_RISK_LEVEL MODIFY (RISK_COLOUR NOT NULL ENABLE)
                                    *
ERROR at line 1:
ORA-01442: column to be modified to NOT NULL is already NOT NULL


Elapsed: 00:00:00.01
SQL> 
SQL>   ALTER TABLE RM_RISK_LEVEL MODIFY (STATUS NOT NULL ENABLE);
  ALTER TABLE RM_RISK_LEVEL MODIFY (STATUS NOT NULL ENABLE)
                                    *
ERROR at line 1:
ORA-01442: column to be modified to NOT NULL is already NOT NULL


Elapsed: 00:00:00.03
SQL> 
SQL> 
SQL> 
SQL> --------------------------------------------------------
SQL> --  File created - Thursday-May-26-2011
SQL> --------------------------------------------------------
SQL> --------------------------------------------------------
SQL> --  DDL for Table RM_RISK_LIKELIHOOD_SEVERITY
SQL> --------------------------------------------------------
SQL> 
SQL>   CREATE TABLE RM_RISK_LIKELIHOOD_SEVERITY
  2  	(    RISK_NO VARCHAR2(9 CHAR),
  3  	     BUSINESS_UNIT_AFFECTED_ID NUMBER(10,0),
  4  	     INITIAL_SEVERITY_ID NUMBER(10,0),
  5  	     INITIAL_LIKELIHOOD_ID NUMBER(10,0),
  6  	     RESIDUAL_SEVERITY_ID NUMBER(10,0),
  7  	     RESIDUAL_LIKELIHOOD_ID NUMBER(10,0),
  8  	     ENTERED_BY NUMBER(10,0),
  9  	     ENTERED_ON DATE,
 10  	     PUBLISH NUMBER(5,0) DEFAULT (-1),
 11  	     UPDATED_BY NUMBER(10,0),
 12  	     UPDATED_ON DATE
 13  );
  CREATE TABLE RM_RISK_LIKELIHOOD_SEVERITY
               *
ERROR at line 1:
ORA-00955: name is already used by an existing object


Elapsed: 00:00:00.00
SQL> REM INSERTING into RM_RISK_LIKELIHOOD_SEVERITY
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R12-10',70,5,4,2,2,147,to_date('09/02/10','DD/MM/RR'),-1,147,to_date('24/02/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R12-10',70,5,4,2,2,147,to_date('09/02/10','DD/MM/RR'),-1,147,to_date('24/02/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.06
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R12-10',71,null,null,null,null,147,to_date('04/02/10','DD/MM/RR'),-1,147,to_date('24/02/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R12-10',71,null,null,null,null,147,to_date('04/02/10','DD/MM/RR'),-1,147,to_date('24/02/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.04
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R13-10',120,null,null,null,null,147,to_date('04/02/10','DD/MM/RR'),-1,147,to_date('04/02/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R13-10',120,null,null,null,null,147,to_date('04/02/10','DD/MM/RR'),-1,147,to_date('04/02/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.04
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R2-09',2,4,2,1,2,147,to_date('11/12/09','DD/MM/RR'),-1,147,to_date('20/12/09','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R2-09',2,4,2,1,2,147,to_date('11/12/09','DD/MM/RR'),-1,147,to_date('20/12/09','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R2-09',71,3,4,2,2,147,to_date('10/12/09','DD/MM/RR'),-1,147,to_date('20/12/09','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R2-09',71,3,4,2,2,147,to_date('10/12/09','DD/MM/RR'),-1,147,to_date('20/12/09','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R26-10',2,null,null,null,null,124,to_date('02/03/10','DD/MM/RR'),-1,124,to_date('04/03/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R26-10',2,null,null,null,null,124,to_date('02/03/10','DD/MM/RR'),-1,124,to_date('04/03/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R3-09',71,null,null,null,null,124,to_date('10/12/09','DD/MM/RR'),-1,null,null);
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R3-09',71,null,null,null,null,124,to_date('10/12/09','DD/MM/RR'),-1,null,null)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.06
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R30-10',159,3,4,2,4,153,to_date('05/03/10','DD/MM/RR'),-1,162,to_date('05/03/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R30-10',159,3,4,2,4,153,to_date('05/03/10','DD/MM/RR'),-1,162,to_date('05/03/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.04
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R33-10',160,3,3,1,3,153,to_date('05/03/10','DD/MM/RR'),-1,170,to_date('07/07/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R33-10',160,3,3,1,3,153,to_date('05/03/10','DD/MM/RR'),-1,170,to_date('07/07/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R34-10',160,4,3,1,3,153,to_date('05/03/10','DD/MM/RR'),0,162,to_date('04/05/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R34-10',160,4,3,1,3,153,to_date('05/03/10','DD/MM/RR'),0,162,to_date('04/05/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R37-10',160,3,3,null,null,163,to_date('05/03/10','DD/MM/RR'),-1,162,to_date('05/03/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R37-10',160,3,3,null,null,163,to_date('05/03/10','DD/MM/RR'),-1,162,to_date('05/03/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R4-09',2,3,4,2,2,124,to_date('11/12/09','DD/MM/RR'),-1,147,to_date('10/01/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R4-09',2,3,4,2,2,124,to_date('11/12/09','DD/MM/RR'),-1,147,to_date('10/01/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R4-09',120,null,null,null,null,124,to_date('17/12/09','DD/MM/RR'),-1,147,to_date('10/01/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R4-09',120,null,null,null,null,124,to_date('17/12/09','DD/MM/RR'),-1,147,to_date('10/01/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R40-10',2,null,null,null,null,null,null,-1,164,to_date('14/06/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R40-10',2,null,null,null,null,null,null,-1,164,to_date('14/06/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.01
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R40-10',71,3,3,2,2,162,to_date('11/04/10','DD/MM/RR'),-1,164,to_date('14/06/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R40-10',71,3,3,2,2,162,to_date('11/04/10','DD/MM/RR'),-1,164,to_date('14/06/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.01
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R41-10',71,4,4,4,2,162,to_date('11/04/10','DD/MM/RR'),-1,170,to_date('07/05/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R41-10',71,4,4,4,2,162,to_date('11/04/10','DD/MM/RR'),-1,170,to_date('07/05/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R42-10',2,3,4,3,1,162,to_date('12/04/10','DD/MM/RR'),-1,170,to_date('07/05/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R42-10',2,3,4,3,1,162,to_date('12/04/10','DD/MM/RR'),-1,170,to_date('07/05/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R43-10',2,3,5,3,2,162,to_date('12/04/10','DD/MM/RR'),-1,170,to_date('24/06/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R43-10',2,3,5,3,2,162,to_date('12/04/10','DD/MM/RR'),-1,170,to_date('24/06/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R43-10',106,4,3,1,1,null,null,-1,170,to_date('24/06/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R43-10',106,4,3,1,1,null,null,-1,170,to_date('24/06/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R44-10',2,4,4,4,1,162,to_date('12/04/10','DD/MM/RR'),-1,170,to_date('07/05/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R44-10',2,4,4,4,1,162,to_date('12/04/10','DD/MM/RR'),-1,170,to_date('07/05/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.06
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R46-10',122,3,4,3,1,153,to_date('07/05/10','DD/MM/RR'),-1,170,to_date('07/05/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R46-10',122,3,4,3,1,153,to_date('07/05/10','DD/MM/RR'),-1,170,to_date('07/05/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.04
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R47-10',160,4,4,3,1,null,null,-1,170,to_date('19/11/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R47-10',160,4,4,3,1,null,null,-1,170,to_date('19/11/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R6-10',122,3,5,1,2,124,to_date('15/01/10','DD/MM/RR'),-1,124,to_date('15/01/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R6-10',122,3,5,1,2,124,to_date('15/01/10','DD/MM/RR'),-1,124,to_date('15/01/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.06
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R7-10',2,3,3,1,1,147,to_date('18/01/10','DD/MM/RR'),-1,147,to_date('05/02/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R7-10',2,3,3,1,1,147,to_date('18/01/10','DD/MM/RR'),-1,147,to_date('05/02/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.06
SQL> Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R7-10',70,3,4,1,1,124,to_date('18/01/10','DD/MM/RR'),-1,147,to_date('05/02/10','DD/MM/RR'));
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R7-10',70,3,4,1,1,124,to_date('18/01/10','DD/MM/RR'),-1,147,to_date('05/02/10','DD/MM/RR'))
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated


Elapsed: 00:00:00.04
SQL> --------------------------------------------------------
SQL> --  DDL for Index PK_RM_RISK_LIKELIHOOD_CONSEQUE
SQL> --------------------------------------------------------
SQL> 
SQL>   CREATE UNIQUE INDEX PK_RM_RISK_LIKELIHOOD_CONSEQUE ON RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO, BUSINESS_UNIT_AFFECTED_ID)
  2    PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  3    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  4    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  5    TABLESPACE USERS ;
  CREATE UNIQUE INDEX PK_RM_RISK_LIKELIHOOD_CONSEQUE ON RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO, BUSINESS_UNIT_AFFECTED_ID)
                      *
ERROR at line 1:
ORA-00955: name is already used by an existing object


Elapsed: 00:00:00.01
SQL> --------------------------------------------------------
SQL> --  Constraints for Table RM_RISK_LIKELIHOOD_SEVERITY
SQL> --------------------------------------------------------
SQL> 
SQL>   ALTER TABLE RM_RISK_LIKELIHOOD_SEVERITY ADD CONSTRAINT PK_RM_RISK_LIKELIHOOD_CONSEQUE PRIMARY KEY (RISK_NO, BUSINESS_UNIT_AFFECTED_ID)
  2    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  3    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  4    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  5    TABLESPACE USERS  ENABLE;
  ALTER TABLE RM_RISK_LIKELIHOOD_SEVERITY ADD CONSTRAINT PK_RM_RISK_LIKELIHOOD_CONSEQUE PRIMARY KEY (RISK_NO, BUSINESS_UNIT_AFFECTED_ID)
                                                                                        *
ERROR at line 1:
ORA-02260: table can have only one primary key


Elapsed: 00:00:00.04
SQL> 
SQL>   ALTER TABLE RM_RISK_LIKELIHOOD_SEVERITY MODIFY (RISK_NO NOT NULL ENABLE);
  ALTER TABLE RM_RISK_LIKELIHOOD_SEVERITY MODIFY (RISK_NO NOT NULL ENABLE)
                                                  *
ERROR at line 1:
ORA-01442: column to be modified to NOT NULL is already NOT NULL


Elapsed: 00:00:00.03
SQL> 
SQL>   ALTER TABLE RM_RISK_LIKELIHOOD_SEVERITY MODIFY (BUSINESS_UNIT_AFFECTED_ID NOT NULL ENABLE);
  ALTER TABLE RM_RISK_LIKELIHOOD_SEVERITY MODIFY (BUSINESS_UNIT_AFFECTED_ID NOT NULL ENABLE)
                                                  *
ERROR at line 1:
ORA-01442: column to be modified to NOT NULL is already NOT NULL


Elapsed: 00:00:00.01
SQL> 
SQL>   ALTER TABLE RM_RISK_LIKELIHOOD_SEVERITY MODIFY (PUBLISH NOT NULL ENABLE);
  ALTER TABLE RM_RISK_LIKELIHOOD_SEVERITY MODIFY (PUBLISH NOT NULL ENABLE)
                                                  *
ERROR at line 1:
ORA-01442: column to be modified to NOT NULL is already NOT NULL


Elapsed: 00:00:00.01
SQL> 
SQL> --------------------------------------------------------
SQL> --  File created - Thursday-May-26-2011
SQL> --------------------------------------------------------
SQL> --------------------------------------------------------
SQL> --  DDL for Table RM_RISK_MATRIX
SQL> --------------------------------------------------------
SQL> 
SQL>   CREATE TABLE RM_RISK_MATRIX
  2  	(    SEVERITY_ID NUMBER(10,0),
  3  	     LIKELIHOOD_ID NUMBER(10,0),
  4  	     RISK_LEVEL_ID NUMBER(10,0)
  5  );
  CREATE TABLE RM_RISK_MATRIX
               *
ERROR at line 1:
ORA-00955: name is already used by an existing object


Elapsed: 00:00:00.01
SQL> REM INSERTING into RM_RISK_MATRIX
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (1,1,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (1,1,1)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.07
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (1,2,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (1,2,1)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.04
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (1,3,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (1,3,1)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.04
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (1,4,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (1,4,1)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.06
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (1,5,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (1,5,1)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (2,1,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (2,1,1)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.06
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (2,2,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (2,2,1)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.04
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (2,3,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (2,3,1)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (2,4,2);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (2,4,2)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (2,5,2);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (2,5,2)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.07
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (3,1,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (3,1,1)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (3,2,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (3,2,1)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.06
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (3,3,2);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (3,3,2)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.06
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (3,4,2);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (3,4,2)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.04
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (3,5,3);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (3,5,3)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (4,1,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (4,1,1)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (4,2,2);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (4,2,2)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (4,3,2);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (4,3,2)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (4,4,3);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (4,4,3)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.01
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (4,5,3);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (4,5,3)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (5,1,1);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (5,1,1)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (5,2,2);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (5,2,2)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (5,3,3);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (5,3,3)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (5,4,3);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (5,4,3)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.03
SQL> Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (5,5,3);
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (5,5,3)
*
ERROR at line 1:
ORA-00001: unique constraint (BUD.PK_RM_RISK_MATRIX) violated


Elapsed: 00:00:00.03
SQL> --------------------------------------------------------
SQL> --  DDL for Index PK_RM_RISK_MATRIX
SQL> --------------------------------------------------------
SQL> 
SQL>   CREATE UNIQUE INDEX PK_RM_RISK_MATRIX ON RM_RISK_MATRIX (SEVERITY_ID, LIKELIHOOD_ID)
  2    PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  3    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  4    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  5    TABLESPACE USERS ;
  CREATE UNIQUE INDEX PK_RM_RISK_MATRIX ON RM_RISK_MATRIX (SEVERITY_ID, LIKELIHOOD_ID)
                      *
ERROR at line 1:
ORA-00955: name is already used by an existing object


Elapsed: 00:00:00.01
SQL> --------------------------------------------------------
SQL> --  Constraints for Table RM_RISK_MATRIX
SQL> --------------------------------------------------------
SQL> 
SQL>   ALTER TABLE RM_RISK_MATRIX ADD CONSTRAINT PK_RM_RISK_MATRIX PRIMARY KEY (SEVERITY_ID, LIKELIHOOD_ID)
  2    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  3    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  4    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  5    TABLESPACE USERS  ENABLE;
  ALTER TABLE RM_RISK_MATRIX ADD CONSTRAINT PK_RM_RISK_MATRIX PRIMARY KEY (SEVERITY_ID, LIKELIHOOD_ID)
                                                              *
ERROR at line 1:
ORA-02260: table can have only one primary key


Elapsed: 00:00:00.01
SQL> 
SQL>   ALTER TABLE RM_RISK_MATRIX MODIFY (SEVERITY_ID NOT NULL ENABLE);
  ALTER TABLE RM_RISK_MATRIX MODIFY (SEVERITY_ID NOT NULL ENABLE)
                                     *
ERROR at line 1:
ORA-01442: column to be modified to NOT NULL is already NOT NULL


Elapsed: 00:00:00.01
SQL> 
SQL>   ALTER TABLE RM_RISK_MATRIX MODIFY (LIKELIHOOD_ID NOT NULL ENABLE);
  ALTER TABLE RM_RISK_MATRIX MODIFY (LIKELIHOOD_ID NOT NULL ENABLE)
                                     *
ERROR at line 1:
ORA-01442: column to be modified to NOT NULL is already NOT NULL


Elapsed: 00:00:00.01
SQL> 
SQL>   ALTER TABLE RM_RISK_MATRIX MODIFY (RISK_LEVEL_ID NOT NULL ENABLE);
  ALTER TABLE RM_RISK_MATRIX MODIFY (RISK_LEVEL_ID NOT NULL ENABLE)
                                     *
ERROR at line 1:
ORA-01442: column to be modified to NOT NULL is already NOT NULL


Elapsed: 00:00:00.01
SQL> 
SQL> 
SQL> 
SQL> 
SQL>   CREATE TABLE RM_RISK
  2  	(    RISK_NO VARCHAR2(9 CHAR),
  3  	     RISK_DESCRIPTION CLOB,
  4  	     DATE_IDENTIFIED DATE,
  5  	     BUSINESS_UNIT_AFFECTED_ID NUMBER(10,0),
  6  	     EQUIPMENT_INVOLVED VARCHAR2(255 CHAR),
  7  	     RISK_CATEGORY_ID NUMBER(10,0),
  8  	     RISK_TYPE_ID NUMBER(10,0),
  9  	     ENTERED_BY_ID NUMBER(10,0),
 10  	     ENTERED_ON DATE,
 11  	     POTENTIAL_CURRENT_ID NUMBER(10,0),
 12  	     WR_PERIOD NUMBER(5,0),
 13  	     WR_TYPE VARCHAR2(4 CHAR),
 14  	     WR_NUMBER NUMBER(10,0),
 15  	     HAZARD_NO VARCHAR2(9 CHAR),
 16  	     OCCURRENCE_NO VARCHAR2(9 CHAR),
 17  	     FINDING_NO VARCHAR2(9 CHAR),
 18  	     LAST_REVIEWED_DATE DATE,
 19  	     LAST_REVIEWED_BY_ID NUMBER(10,0),
 20  	     NEXT_REVIEW_DATE DATE,
 21  	     FEEDBACK VARCHAR2(2000 CHAR),
 22  	     FEEDBACK_BY_ID NUMBER(10,0),
 23  	     FEEDBACK_ENTERED_ON DATE,
 24  	     RISK_STATUS_ID NUMBER(10,0) DEFAULT (1),
 25  	     OVERAL_CONTROL_EFECTIVENES_ID NUMBER(10,0),
 26  	     RISK_TREND_ID NUMBER(10,0),
 27  	     RISK_OWNER VARCHAR2(50),
 28  	     RISK_TREND_COMMENTARY VARCHAR2(2000),
 29  	     RISK_TITLE VARCHAR2(100) DEFAULT 'Risk Title',
 30  	     EVENTS_AND_DEVELOPMENTS VARCHAR2(4000)
 31  	);
  CREATE TABLE RM_RISK
               *
ERROR at line 1:
ORA-00955: name is already used by an existing object


Elapsed: 00:00:00.01
SQL> 
SQL> REM INSERTING into RM_RISK
SQL> Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R12-10',to_date('04/02/10','DD/MM/RR'),71,'Catering Truck',4,5,147,to_date('04/02/10','DD/MM/RR'),1,null,null,null,null,null,null,to_date('09/02/10','DD/MM/RR'),147,to_date('28/02/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Objects falling from Truck',null);

1 row created.

Elapsed: 00:00:00.00
SQL> Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R13-10',to_date('04/02/10','DD/MM/RR'),120,'Catering Truck',9,null,147,to_date('04/02/10','DD/MM/RR'),null,null,null,null,null,null,null,to_date('04/02/10','DD/MM/RR'),147,to_date('28/02/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Goods falling off the Catering truck - no rail in place',null);

1 row created.

Elapsed: 00:00:00.01
SQL> Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R2-09',to_date('10/12/09','DD/MM/RR'),71,'Catering Vehicle',12,null,147,to_date('10/12/09','DD/MM/RR'),null,null,null,null,null,null,null,to_date('10/12/09','DD/MM/RR'),147,to_date('31/12/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Goods falling off the back of Catering Vehicles',null);

1 row created.

Elapsed: 00:00:00.00
SQL> Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R26-10',to_date('02/03/10','DD/MM/RR'),2,'People',40,null,124,to_date('02/03/10','DD/MM/RR'),null,null,null,null,null,null,null,to_date('04/03/10','DD/MM/RR'),124,null,null,null,null,3,null,null,null,null,'New route',null);

1 row created.

Elapsed: 00:00:00.01
SQL> Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R3-09',to_date('10/12/09','DD/MM/RR'),71,null,40,null,124,to_date('10/12/09','DD/MM/RR'),null,null,null,null,'H1-09',null,null,null,null,null,null,null,null,1,null,null,null,null,'Air Bridge - Hydraulic Forward Drive Failure',null);

1 row created.

Elapsed: 00:00:00.01
SQL> Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R30-10',to_date('03/03/10','DD/MM/RR'),159,null,null,7,153,to_date('05/03/10','DD/MM/RR'),2,null,null,null,null,null,null,to_date('05/03/10','DD/MM/RR'),162,to_date('10/03/10','DD/MM/RR'),null,null,null,3,53,58,'Peter Hunt',null,'Foreign Currency movement HKD against USD',null);

1 row created.

Elapsed: 00:00:00.00
SQL> Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R33-10',to_date('05/03/10','DD/MM/RR'),160,'Construction Vehicles
  2  ',8,12,153,to_date('05/03/10','DD/MM/RR'),2,null,null,null,null,null,null,to_date('04/05/10','DD/MM/RR'),162,to_date('04/05/11','DD/MM/RR'),'Thank you for lodging your concern.
  3  This is now being processed and we will keep you updated.',163,to_date('05/03/10','DD/MM/RR'),3,53,57,'Eddie Rogan','The need for vigilance is extreme','Procedure deviation',null);

1 row created.

Elapsed: 00:00:00.00
SQL> Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R34-10',to_date('05/03/10','DD/MM/RR'),160,'Aircraft / construction vehicles',null,12,153,to_date('05/03/10','DD/MM/RR'),2,null,null,null,null,null,null,to_date('04/05/10','DD/MM/RR'),162,to_date('02/06/10','DD/MM/RR'),'Thanks but we''re not going to do anything with this.',162,to_date('04/05/10','DD/MM/RR'),3,53,57,'Julie Smith','Vigilance is required at all times especially during evenings early mornings when visual is not that great.  ','Conflict with crossing vehicle',null);

1 row created.

Elapsed: 00:00:00.00
SQL> Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R37-10',to_date('04/03/10','DD/MM/RR'),160,'Aircraft / Catering truck',40,null,163,to_date('05/03/10','DD/MM/RR'),null,null,null,null,null,'O3-10',null,to_date('05/03/10','DD/MM/RR'),163,to_date('10/03/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Conflict with ground vehicle',null);

1 row created.

Elapsed: 00:00:00.01
SQL> Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R4-09',to_date('11/12/09','DD/MM/RR'),2,'Cabin Crew & O/head bins',31,4,124,to_date('11/12/09','DD/MM/RR'),1,null,null,null,null,null,null,to_date('17/12/09','DD/MM/RR'),124,null,'Looking into!',null,null,3,null,null,null,null,'Placing baggage in O/head bins',null);

1 row created.

Elapsed: 00:00:00.00
SQL> Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R40-10',to_date('11/04/10','DD/MM/RR'),71,null,null,null,162,to_date('11/04/10','DD/MM/RR'),null,null,null,null,'H5-10',null,null,to_date('11/04/10','DD/MM/RR'),162,to_date('17/09/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'CFIT',null);

1 row created.

Elapsed: 00:00:00.01
SQL> Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R41-10',to_date('11/04/10','DD/MM/RR'),71,null,null,null,162,to_date('11/04/10','DD/MM/RR'),null,null,null,null,'H5-10',null,null,to_date('11/04/10','DD/MM/RR'),162,to_date('17/09/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Mid-air collision',null);

1 row created.

Elapsed: 00:00:00.00
SQL> Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R42-10',to_date('11/04/10','DD/MM/RR'),2,null,null,null,162,to_date('12/04/10','DD/MM/RR'),null,null,null,null,'H5-10',null,null,to_date('12/04/10','DD/MM/RR'),162,to_date('31/08/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Landing overrun after landing',null);

1 row created.

Elapsed: 00:00:00.00
SQL> Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R43-10',to_date('11/04/10','DD/MM/RR'),2,null,null,null,162,to_date('12/04/10','DD/MM/RR'),null,null,null,null,'H5-10',null,null,to_date('12/04/10','DD/MM/RR'),162,to_date('30/10/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Landing overrun following aborted take-off.',null);

1 row created.

Elapsed: 00:00:00.01
SQL> Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R44-10',to_date('11/04/10','DD/MM/RR'),2,null,null,null,162,to_date('12/04/10','DD/MM/RR'),null,null,null,null,'H5-10',null,null,to_date('12/04/10','DD/MM/RR'),162,to_date('23/09/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Bird Strike',null);

1 row created.

Elapsed: 00:00:00.00
SQL> Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R46-10',to_date('07/05/10','DD/MM/RR'),122,'Airbridge and Aircraft',40,12,153,to_date('07/05/10','DD/MM/RR'),2,null,null,null,'H6-10',null,null,to_date('07/05/10','DD/MM/RR'),170,to_date('07/05/11','DD/MM/RR'),null,null,null,3,54,57,'Bob Chambers','Reported occurrences of this event type have been on the increase since the introduction of these differently configured aircraft.','Adverse trend of Pax Door impacting the airbridge causing damage.	',null);

1 row created.

Elapsed: 00:00:00.01
SQL> Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R47-10',to_date('19/11/10','DD/MM/RR'),160,null,null,null,170,to_date('19/11/10','DD/MM/RR'),null,null,null,null,null,null,'F7-10',to_date('19/11/10','DD/MM/RR'),170,to_date('23/11/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'passenger screening risk',null);

1 row created.

Elapsed: 00:00:00.00
SQL> Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R6-10',to_date('15/01/10','DD/MM/RR'),122,'Ramp Vans',39,11,124,to_date('15/01/10','DD/MM/RR'),2,null,null,null,null,null,null,to_date('15/01/10','DD/MM/RR'),124,to_date('22/01/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'No servicing requirement for ground vehicles',null);

1 row created.

Elapsed: 00:00:00.00
SQL> Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R7-10',to_date('18/01/10','DD/MM/RR'),70,'Access stand',2,12,124,to_date('18/01/10','DD/MM/RR'),2,null,null,null,null,null,null,to_date('12/02/10','DD/MM/RR'),147,to_date('12/02/10','DD/MM/RR'),'Who gets this?  ',147,to_date('18/01/10','DD/MM/RR'),3,null,null,null,null,'Overstretching and falling',null);

1 row created.

Elapsed: 00:00:00.00
SQL> 
SQL> commit;

Commit complete.

Elapsed: 00:00:00.01
SQL> 
SQL> 
SQL> SELECT (SELECT LPA_L4.RiskLevel
  2  FROM
  3  (SELECT LPA_L5.RISK_COLOUR AS RiskColour,
  4    LPA_L5.RISK_LEVEL AS RiskLevel,
  5    LPA_L5.RISK_LEVEL_ABBREVIATION AS RiskLevelAbbreviation,
  6    LPA_L5.RISK_LEVEL_ID AS RiskLevelID,
  7    LPA_L5.STATUS AS Status
  8  FROM
  9  ( RM_RISK_LEVEL LPA_L5
 10  INNER JOIN
 11  RM_RISK_MATRIX LPA_L6  ON	LPA_L5.RISK_LEVEL_ID=LPA_L6.RISK_LEVEL_ID)
 12  WHERE
 13  ( ( ( ( ( LPA_L6.SEVERITY_ID = LPA_L2.INITIAL_SEVERITY_ID) AND ( LPA_L6.LIKELIHOOD_ID = LPA_L2.INITIAL_LIKELIHOOD_ID))))) AND rownum <= 1) LPA_L4
 14  WHERE
 15  rownum <= 1) AS LPFA_1
 16  FROM
 17  ( RM_RISK LPA_L1
 18  LEFT JOIN
 19  RM_RISK_LIKELIHOOD_SEVERITY LPA_L2  ON  LPA_L1.RISK_NO=LPA_L2.RISK_NO)
 20  /
( ( ( ( ( LPA_L6.SEVERITY_ID = LPA_L2.INITIAL_SEVERITY_ID) AND ( LPA_L6.LIKELIHOOD_ID = LPA_L2.INITIAL_LIKELIHOOD_ID))))) AND rownum <= 1) LPA_L4
                                                                                        *
ERROR at line 13:
ORA-00904: "LPA_L2"."INITIAL_LIKELIHOOD_ID": invalid identifier


Elapsed: 00:00:00.04
SQL> 
SQL> 
SQL> spool off

Open in new window

0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35843361
OK, one last thought. I believed we'd been using Version 10.2.0.7 (the terminal version of 10.2 was 10.2.0.5) and only yesterday discovered it was 10.2.0.1. Was there something in the upgrades for 1 to 3 or beyond that may have caused this? Over the months, I have created many version of the database from scripts for various testing scenarios - it also worked with 10, never with 11 (albeit that same vm.

0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35843409
If the script I posted runs on your databases then something is definitely wrong.

If should always generate a 904.  I've tested on two different 10g versions and I generate the 904.

Can you set echo on and run the script with a select * from v$version?
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35843549
OK, I can't do this until Monday as I'm away today
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35871408
Here are the results of ruinning the script
BANNER                                                           
---------------------------------------------------------------- 
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod 
PL/SQL Release 10.2.0.1.0 - Production                           
CORE	10.2.0.1.0	Production                                         
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production          
NLSRTL Version 10.2.0.1.0 - Production                           

sequence RM_RISK_LEVEL_ID dropped.
sequence RM_RISK_LEVEL_ID created.

Error starting at line 20 in command:
CREATE TABLE RM_RISK_LEVEL 
   (	RISK_LEVEL_ID NUMBER(10,0), 
	RISK_LEVEL VARCHAR2(50 CHAR), 
	RISK_COLOUR VARCHAR2(6 CHAR), 
	STATUS NUMBER(5,0) DEFAULT (-1), 
	RISK_LEVEL_ABBREVIATION VARCHAR2(5 CHAR)
)
Error at Command Line:20 Column:13
Error report:
SQL Error: ORA-00955: name is already used by an existing object
00955. 00000 -  "name is already used by an existing object"
*Cause:    
*Action:

Error starting at line 28 in command:
Insert into RM_RISK_LEVEL (RISK_LEVEL_ID,RISK_LEVEL,RISK_COLOUR,STATUS,RISK_LEVEL_ABBREVIATION) values (1,'Acceptable','008000',-1,null)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RISK_RISK_LEVEL) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 29 in command:
Insert into RM_RISK_LEVEL (RISK_LEVEL_ID,RISK_LEVEL,RISK_COLOUR,STATUS,RISK_LEVEL_ABBREVIATION) values (2,'Undesirable','ffff00',-1,null)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RISK_RISK_LEVEL) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 30 in command:
Insert into RM_RISK_LEVEL (RISK_LEVEL_ID,RISK_LEVEL,RISK_COLOUR,STATUS,RISK_LEVEL_ABBREVIATION) values (3,'Unacceptable','ff0000',-1,null)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RISK_RISK_LEVEL) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 35 in command:
CREATE UNIQUE INDEX PK_RISK_RISK_LEVEL ON RM_RISK_LEVEL (RISK_LEVEL_ID) 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE USERS 
Error at Command Line:35 Column:20
Error report:
SQL Error: ORA-00955: name is already used by an existing object
00955. 00000 -  "name is already used by an existing object"
*Cause:    
*Action:

Error starting at line 44 in command:
ALTER TABLE RM_RISK_LEVEL ADD CONSTRAINT PK_RISK_RISK_LEVEL PRIMARY KEY (RISK_LEVEL_ID)
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE USERS  ENABLE
Error report:
SQL Error: ORA-02260: table can have only one primary key
02260. 00000 -  "table can have only one primary key"
*Cause:    Self-evident.
*Action:   Remove the extra primary key.

Error starting at line 50 in command:
ALTER TABLE RM_RISK_LEVEL MODIFY (RISK_LEVEL_ID NOT NULL ENABLE)
Error report:
SQL Error: ORA-01442: column to be modified to NOT NULL is already NOT NULL
01442. 00000 -  "column to be modified to NOT NULL is already NOT NULL"
*Cause:    
*Action:

Error starting at line 52 in command:
ALTER TABLE RM_RISK_LEVEL MODIFY (RISK_LEVEL NOT NULL ENABLE)
Error report:
SQL Error: ORA-01442: column to be modified to NOT NULL is already NOT NULL
01442. 00000 -  "column to be modified to NOT NULL is already NOT NULL"
*Cause:    
*Action:

Error starting at line 54 in command:
ALTER TABLE RM_RISK_LEVEL MODIFY (RISK_COLOUR NOT NULL ENABLE)
Error report:
SQL Error: ORA-01442: column to be modified to NOT NULL is already NOT NULL
01442. 00000 -  "column to be modified to NOT NULL is already NOT NULL"
*Cause:    
*Action:

Error starting at line 56 in command:
ALTER TABLE RM_RISK_LEVEL MODIFY (STATUS NOT NULL ENABLE)
Error report:
SQL Error: ORA-01442: column to be modified to NOT NULL is already NOT NULL
01442. 00000 -  "column to be modified to NOT NULL is already NOT NULL"
*Cause:    
*Action:

Error starting at line 67 in command:
CREATE TABLE RM_RISK_LIKELIHOOD_SEVERITY 
   (	RISK_NO VARCHAR2(9 CHAR), 
	BUSINESS_UNIT_AFFECTED_ID NUMBER(10,0), 
	INITIAL_SEVERITY_ID NUMBER(10,0), 
	INITIAL_LIKELIHOOD_ID NUMBER(10,0), 
	RESIDUAL_SEVERITY_ID NUMBER(10,0), 
	RESIDUAL_LIKELIHOOD_ID NUMBER(10,0), 
	ENTERED_BY NUMBER(10,0), 
	ENTERED_ON DATE, 
	PUBLISH NUMBER(5,0) DEFAULT (-1), 
	UPDATED_BY NUMBER(10,0), 
	UPDATED_ON DATE
)
Error at Command Line:67 Column:13
Error report:
SQL Error: ORA-00955: name is already used by an existing object
00955. 00000 -  "name is already used by an existing object"
*Cause:    
*Action:

Error starting at line 81 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R12-10',70,5,4,2,2,147,to_date('09/02/10','DD/MM/RR'),-1,147,to_date('24/02/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 82 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R12-10',71,null,null,null,null,147,to_date('04/02/10','DD/MM/RR'),-1,147,to_date('24/02/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 83 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R13-10',120,null,null,null,null,147,to_date('04/02/10','DD/MM/RR'),-1,147,to_date('04/02/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 84 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R2-09',2,4,2,1,2,147,to_date('11/12/09','DD/MM/RR'),-1,147,to_date('20/12/09','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 85 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R2-09',71,3,4,2,2,147,to_date('10/12/09','DD/MM/RR'),-1,147,to_date('20/12/09','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 86 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R26-10',2,null,null,null,null,124,to_date('02/03/10','DD/MM/RR'),-1,124,to_date('04/03/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 87 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R3-09',71,null,null,null,null,124,to_date('10/12/09','DD/MM/RR'),-1,null,null)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 88 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R30-10',159,3,4,2,4,153,to_date('05/03/10','DD/MM/RR'),-1,162,to_date('05/03/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 89 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R33-10',160,3,3,1,3,153,to_date('05/03/10','DD/MM/RR'),-1,170,to_date('07/07/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 90 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R34-10',160,4,3,1,3,153,to_date('05/03/10','DD/MM/RR'),0,162,to_date('04/05/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 91 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R37-10',160,3,3,null,null,163,to_date('05/03/10','DD/MM/RR'),-1,162,to_date('05/03/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 92 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R4-09',2,3,4,2,2,124,to_date('11/12/09','DD/MM/RR'),-1,147,to_date('10/01/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 93 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R4-09',120,null,null,null,null,124,to_date('17/12/09','DD/MM/RR'),-1,147,to_date('10/01/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 94 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R40-10',2,null,null,null,null,null,null,-1,164,to_date('14/06/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 95 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R40-10',71,3,3,2,2,162,to_date('11/04/10','DD/MM/RR'),-1,164,to_date('14/06/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 96 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R41-10',71,4,4,4,2,162,to_date('11/04/10','DD/MM/RR'),-1,170,to_date('07/05/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 97 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R42-10',2,3,4,3,1,162,to_date('12/04/10','DD/MM/RR'),-1,170,to_date('07/05/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 98 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R43-10',2,3,5,3,2,162,to_date('12/04/10','DD/MM/RR'),-1,170,to_date('24/06/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 99 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R43-10',106,4,3,1,1,null,null,-1,170,to_date('24/06/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 100 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R44-10',2,4,4,4,1,162,to_date('12/04/10','DD/MM/RR'),-1,170,to_date('07/05/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 101 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R46-10',122,3,4,3,1,153,to_date('07/05/10','DD/MM/RR'),-1,170,to_date('07/05/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 102 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R47-10',160,4,4,3,1,null,null,-1,170,to_date('19/11/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 103 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R6-10',122,3,5,1,2,124,to_date('15/01/10','DD/MM/RR'),-1,124,to_date('15/01/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 104 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R7-10',2,3,3,1,1,147,to_date('18/01/10','DD/MM/RR'),-1,147,to_date('05/02/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 105 in command:
Insert into RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO,BUSINESS_UNIT_AFFECTED_ID,INITIAL_SEVERITY_ID,INITIAL_LIKELIHOOD_ID,RESIDUAL_SEVERITY_ID,RESIDUAL_LIKELIHOOD_ID,ENTERED_BY,ENTERED_ON,PUBLISH,UPDATED_BY,UPDATED_ON) values ('R7-10',70,3,4,1,1,124,to_date('18/01/10','DD/MM/RR'),-1,147,to_date('05/02/10','DD/MM/RR'))
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_LIKELIHOOD_CONSEQUE) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 110 in command:
CREATE UNIQUE INDEX PK_RM_RISK_LIKELIHOOD_CONSEQUE ON RM_RISK_LIKELIHOOD_SEVERITY (RISK_NO, BUSINESS_UNIT_AFFECTED_ID) 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE USERS 
Error at Command Line:110 Column:20
Error report:
SQL Error: ORA-00955: name is already used by an existing object
00955. 00000 -  "name is already used by an existing object"
*Cause:    
*Action:

Error starting at line 119 in command:
ALTER TABLE RM_RISK_LIKELIHOOD_SEVERITY ADD CONSTRAINT PK_RM_RISK_LIKELIHOOD_CONSEQUE PRIMARY KEY (RISK_NO, BUSINESS_UNIT_AFFECTED_ID)
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE USERS  ENABLE
Error report:
SQL Error: ORA-02260: table can have only one primary key
02260. 00000 -  "table can have only one primary key"
*Cause:    Self-evident.
*Action:   Remove the extra primary key.

Error starting at line 125 in command:
ALTER TABLE RM_RISK_LIKELIHOOD_SEVERITY MODIFY (RISK_NO NOT NULL ENABLE)
Error report:
SQL Error: ORA-01442: column to be modified to NOT NULL is already NOT NULL
01442. 00000 -  "column to be modified to NOT NULL is already NOT NULL"
*Cause:    
*Action:

Error starting at line 127 in command:
ALTER TABLE RM_RISK_LIKELIHOOD_SEVERITY MODIFY (BUSINESS_UNIT_AFFECTED_ID NOT NULL ENABLE)
Error report:
SQL Error: ORA-01442: column to be modified to NOT NULL is already NOT NULL
01442. 00000 -  "column to be modified to NOT NULL is already NOT NULL"
*Cause:    
*Action:

Error starting at line 129 in command:
ALTER TABLE RM_RISK_LIKELIHOOD_SEVERITY MODIFY (PUBLISH NOT NULL ENABLE)
Error report:
SQL Error: ORA-01442: column to be modified to NOT NULL is already NOT NULL
01442. 00000 -  "column to be modified to NOT NULL is already NOT NULL"
*Cause:    
*Action:

Error starting at line 138 in command:
CREATE TABLE RM_RISK_MATRIX 
   (	SEVERITY_ID NUMBER(10,0), 
	LIKELIHOOD_ID NUMBER(10,0), 
	RISK_LEVEL_ID NUMBER(10,0)
)
Error at Command Line:138 Column:13
Error report:
SQL Error: ORA-00955: name is already used by an existing object
00955. 00000 -  "name is already used by an existing object"
*Cause:    
*Action:

Error starting at line 144 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (1,1,1)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 145 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (1,2,1)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 146 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (1,3,1)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 147 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (1,4,1)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 148 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (1,5,1)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 149 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (2,1,1)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 150 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (2,2,1)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 151 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (2,3,1)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 152 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (2,4,2)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 153 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (2,5,2)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 154 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (3,1,1)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 155 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (3,2,1)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 156 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (3,3,2)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 157 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (3,4,2)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 158 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (3,5,3)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 159 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (4,1,1)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 160 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (4,2,2)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 161 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (4,3,2)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 162 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (4,4,3)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 163 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (4,5,3)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 164 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (5,1,1)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 165 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (5,2,2)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 166 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (5,3,3)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 167 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (5,4,3)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 168 in command:
Insert into RM_RISK_MATRIX (SEVERITY_ID,LIKELIHOOD_ID,RISK_LEVEL_ID) values (5,5,3)
Error report:
SQL Error: ORA-00001: unique constraint (AQD.PK_RM_RISK_MATRIX) violated
00001. 00000 -  "unique constraint (%s.%s) violated"
*Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
           For Trusted Oracle configured in DBMS MAC mode, you may see
           this message if a duplicate entry exists at a different level.
*Action:   Either remove the unique restriction or do not insert the key.

Error starting at line 173 in command:
CREATE UNIQUE INDEX PK_RM_RISK_MATRIX ON RM_RISK_MATRIX (SEVERITY_ID, LIKELIHOOD_ID) 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE USERS 
Error at Command Line:173 Column:20
Error report:
SQL Error: ORA-00955: name is already used by an existing object
00955. 00000 -  "name is already used by an existing object"
*Cause:    
*Action:

Error starting at line 182 in command:
ALTER TABLE RM_RISK_MATRIX ADD CONSTRAINT PK_RM_RISK_MATRIX PRIMARY KEY (SEVERITY_ID, LIKELIHOOD_ID)
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE USERS  ENABLE
Error report:
SQL Error: ORA-02260: table can have only one primary key
02260. 00000 -  "table can have only one primary key"
*Cause:    Self-evident.
*Action:   Remove the extra primary key.

Error starting at line 188 in command:
ALTER TABLE RM_RISK_MATRIX MODIFY (SEVERITY_ID NOT NULL ENABLE)
Error report:
SQL Error: ORA-01442: column to be modified to NOT NULL is already NOT NULL
01442. 00000 -  "column to be modified to NOT NULL is already NOT NULL"
*Cause:    
*Action:

Error starting at line 190 in command:
ALTER TABLE RM_RISK_MATRIX MODIFY (LIKELIHOOD_ID NOT NULL ENABLE)
Error report:
SQL Error: ORA-01442: column to be modified to NOT NULL is already NOT NULL
01442. 00000 -  "column to be modified to NOT NULL is already NOT NULL"
*Cause:    
*Action:

Error starting at line 192 in command:
ALTER TABLE RM_RISK_MATRIX MODIFY (RISK_LEVEL_ID NOT NULL ENABLE)
Error report:
SQL Error: ORA-01442: column to be modified to NOT NULL is already NOT NULL
01442. 00000 -  "column to be modified to NOT NULL is already NOT NULL"
*Cause:    
*Action:

Error starting at line 197 in command:
CREATE TABLE RM_RISK 
   (	RISK_NO VARCHAR2(9 CHAR), 
	RISK_DESCRIPTION CLOB, 
	DATE_IDENTIFIED DATE, 
	BUSINESS_UNIT_AFFECTED_ID NUMBER(10,0), 
	EQUIPMENT_INVOLVED VARCHAR2(255 CHAR), 
	RISK_CATEGORY_ID NUMBER(10,0), 
	RISK_TYPE_ID NUMBER(10,0), 
	ENTERED_BY_ID NUMBER(10,0), 
	ENTERED_ON DATE, 
	POTENTIAL_CURRENT_ID NUMBER(10,0), 
	WR_PERIOD NUMBER(5,0), 
	WR_TYPE VARCHAR2(4 CHAR), 
	WR_NUMBER NUMBER(10,0), 
	HAZARD_NO VARCHAR2(9 CHAR), 
	OCCURRENCE_NO VARCHAR2(9 CHAR), 
	FINDING_NO VARCHAR2(9 CHAR), 
	LAST_REVIEWED_DATE DATE, 
	LAST_REVIEWED_BY_ID NUMBER(10,0), 
	NEXT_REVIEW_DATE DATE, 
	FEEDBACK VARCHAR2(2000 CHAR), 
	FEEDBACK_BY_ID NUMBER(10,0), 
	FEEDBACK_ENTERED_ON DATE, 
	RISK_STATUS_ID NUMBER(10,0) DEFAULT (1), 
	OVERAL_CONTROL_EFECTIVENES_ID NUMBER(10,0), 
	RISK_TREND_ID NUMBER(10,0), 
	RISK_OWNER VARCHAR2(50), 
	RISK_TREND_COMMENTARY VARCHAR2(2000), 
	RISK_TITLE VARCHAR2(100) DEFAULT 'Risk Title', 
	EVENTS_AND_DEVELOPMENTS VARCHAR2(4000)
   )
Error at Command Line:197 Column:13
Error report:
SQL Error: ORA-00955: name is already used by an existing object
00955. 00000 -  "name is already used by an existing object"
*Cause:    
*Action:

Error starting at line 230 in command:
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R12-10',to_date('04/02/10','DD/MM/RR'),71,'Catering Truck',4,5,147,to_date('04/02/10','DD/MM/RR'),1,null,null,null,null,null,null,to_date('09/02/10','DD/MM/RR'),147,to_date('28/02/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Objects falling from Truck',null)
Error report:
SQL Error: ORA-01400: cannot insert NULL into ("AQD"."RM_RISK"."RISK_DESCRIPTION")
01400. 00000 -  "cannot insert NULL into (%s)"
*Cause:    
*Action:

Error starting at line 231 in command:
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R13-10',to_date('04/02/10','DD/MM/RR'),120,'Catering Truck',9,null,147,to_date('04/02/10','DD/MM/RR'),null,null,null,null,null,null,null,to_date('04/02/10','DD/MM/RR'),147,to_date('28/02/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Goods falling off the Catering truck - no rail in place',null)
Error report:
SQL Error: ORA-01400: cannot insert NULL into ("AQD"."RM_RISK"."RISK_DESCRIPTION")
01400. 00000 -  "cannot insert NULL into (%s)"
*Cause:    
*Action:

Error starting at line 232 in command:
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R2-09',to_date('10/12/09','DD/MM/RR'),71,'Catering Vehicle',12,null,147,to_date('10/12/09','DD/MM/RR'),null,null,null,null,null,null,null,to_date('10/12/09','DD/MM/RR'),147,to_date('31/12/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Goods falling off the back of Catering Vehicles',null)
Error report:
SQL Error: ORA-01400: cannot insert NULL into ("AQD"."RM_RISK"."RISK_DESCRIPTION")
01400. 00000 -  "cannot insert NULL into (%s)"
*Cause:    
*Action:

Error starting at line 233 in command:
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R26-10',to_date('02/03/10','DD/MM/RR'),2,'People',40,null,124,to_date('02/03/10','DD/MM/RR'),null,null,null,null,null,null,null,to_date('04/03/10','DD/MM/RR'),124,null,null,null,null,3,null,null,null,null,'New route',null)
Error report:
SQL Error: ORA-01400: cannot insert NULL into ("AQD"."RM_RISK"."RISK_DESCRIPTION")
01400. 00000 -  "cannot insert NULL into (%s)"
*Cause:    
*Action:

Error starting at line 234 in command:
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R3-09',to_date('10/12/09','DD/MM/RR'),71,null,40,null,124,to_date('10/12/09','DD/MM/RR'),null,null,null,null,'H1-09',null,null,null,null,null,null,null,null,1,null,null,null,null,'Air Bridge - Hydraulic Forward Drive Failure',null)
Error report:
SQL Error: ORA-01400: cannot insert NULL into ("AQD"."RM_RISK"."RISK_DESCRIPTION")
01400. 00000 -  "cannot insert NULL into (%s)"
*Cause:    
*Action:

Error starting at line 235 in command:
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R30-10',to_date('03/03/10','DD/MM/RR'),159,null,null,7,153,to_date('05/03/10','DD/MM/RR'),2,null,null,null,null,null,null,to_date('05/03/10','DD/MM/RR'),162,to_date('10/03/10','DD/MM/RR'),null,null,null,3,53,58,'Peter Hunt',null,'Foreign Currency movement HKD against USD',null)
Error report:
SQL Error: ORA-01400: cannot insert NULL into ("AQD"."RM_RISK"."RISK_DESCRIPTION")
01400. 00000 -  "cannot insert NULL into (%s)"
*Cause:    
*Action:

Error starting at line 236 in command:
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R33-10',to_date('05/03/10','DD/MM/RR'),160,'Construction Vehicles 
',8,12,153,to_date('05/03/10','DD/MM/RR'),2,null,null,null,null,null,null,to_date('04/05/10','DD/MM/RR'),162,to_date('04/05/11','DD/MM/RR'),'Thank you for lodging your concern. 
This is now being processed and we will keep you updated.',163,to_date('05/03/10','DD/MM/RR'),3,53,57,'Eddie Rogan','The need for vigilance is extreme','Procedure deviation',null)
Error report:
SQL Error: ORA-01400: cannot insert NULL into ("AQD"."RM_RISK"."RISK_DESCRIPTION")
01400. 00000 -  "cannot insert NULL into (%s)"
*Cause:    
*Action:

Error starting at line 239 in command:
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R34-10',to_date('05/03/10','DD/MM/RR'),160,'Aircraft / construction vehicles',null,12,153,to_date('05/03/10','DD/MM/RR'),2,null,null,null,null,null,null,to_date('04/05/10','DD/MM/RR'),162,to_date('02/06/10','DD/MM/RR'),'Thanks but we''re not going to do anything with this.',162,to_date('04/05/10','DD/MM/RR'),3,53,57,'Julie Smith','Vigilance is required at all times especially during evenings early mornings when visual is not that great.  ','Conflict with crossing vehicle',null)
Error report:
SQL Error: ORA-01400: cannot insert NULL into ("AQD"."RM_RISK"."RISK_DESCRIPTION")
01400. 00000 -  "cannot insert NULL into (%s)"
*Cause:    
*Action:

Error starting at line 240 in command:
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R37-10',to_date('04/03/10','DD/MM/RR'),160,'Aircraft / Catering truck',40,null,163,to_date('05/03/10','DD/MM/RR'),null,null,null,null,null,'O3-10',null,to_date('05/03/10','DD/MM/RR'),163,to_date('10/03/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Conflict with ground vehicle',null)
Error report:
SQL Error: ORA-01400: cannot insert NULL into ("AQD"."RM_RISK"."RISK_DESCRIPTION")
01400. 00000 -  "cannot insert NULL into (%s)"
*Cause:    
*Action:

Error starting at line 241 in command:
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R4-09',to_date('11/12/09','DD/MM/RR'),2,'Cabin Crew & O/head bins',31,4,124,to_date('11/12/09','DD/MM/RR'),1,null,null,null,null,null,null,to_date('17/12/09','DD/MM/RR'),124,null,'Looking into!',null,null,3,null,null,null,null,'Placing baggage in O/head bins',null)
Error report:
SQL Error: ORA-01400: cannot insert NULL into ("AQD"."RM_RISK"."RISK_DESCRIPTION")
01400. 00000 -  "cannot insert NULL into (%s)"
*Cause:    
*Action:

Error starting at line 242 in command:
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R40-10',to_date('11/04/10','DD/MM/RR'),71,null,null,null,162,to_date('11/04/10','DD/MM/RR'),null,null,null,null,'H5-10',null,null,to_date('11/04/10','DD/MM/RR'),162,to_date('17/09/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'CFIT',null)
Error report:
SQL Error: ORA-01400: cannot insert NULL into ("AQD"."RM_RISK"."RISK_DESCRIPTION")
01400. 00000 -  "cannot insert NULL into (%s)"
*Cause:    
*Action:

Error starting at line 243 in command:
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R41-10',to_date('11/04/10','DD/MM/RR'),71,null,null,null,162,to_date('11/04/10','DD/MM/RR'),null,null,null,null,'H5-10',null,null,to_date('11/04/10','DD/MM/RR'),162,to_date('17/09/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Mid-air collision',null)
Error report:
SQL Error: ORA-01400: cannot insert NULL into ("AQD"."RM_RISK"."RISK_DESCRIPTION")
01400. 00000 -  "cannot insert NULL into (%s)"
*Cause:    
*Action:

Error starting at line 244 in command:
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R42-10',to_date('11/04/10','DD/MM/RR'),2,null,null,null,162,to_date('12/04/10','DD/MM/RR'),null,null,null,null,'H5-10',null,null,to_date('12/04/10','DD/MM/RR'),162,to_date('31/08/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Landing overrun after landing',null)
Error report:
SQL Error: ORA-01400: cannot insert NULL into ("AQD"."RM_RISK"."RISK_DESCRIPTION")
01400. 00000 -  "cannot insert NULL into (%s)"
*Cause:    
*Action:

Error starting at line 245 in command:
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R43-10',to_date('11/04/10','DD/MM/RR'),2,null,null,null,162,to_date('12/04/10','DD/MM/RR'),null,null,null,null,'H5-10',null,null,to_date('12/04/10','DD/MM/RR'),162,to_date('30/10/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Landing overrun following aborted take-off.',null)
Error report:
SQL Error: ORA-01400: cannot insert NULL into ("AQD"."RM_RISK"."RISK_DESCRIPTION")
01400. 00000 -  "cannot insert NULL into (%s)"
*Cause:    
*Action:

Error starting at line 246 in command:
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R44-10',to_date('11/04/10','DD/MM/RR'),2,null,null,null,162,to_date('12/04/10','DD/MM/RR'),null,null,null,null,'H5-10',null,null,to_date('12/04/10','DD/MM/RR'),162,to_date('23/09/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'Bird Strike',null)
Error report:
SQL Error: ORA-01400: cannot insert NULL into ("AQD"."RM_RISK"."RISK_DESCRIPTION")
01400. 00000 -  "cannot insert NULL into (%s)"
*Cause:    
*Action:

Error starting at line 247 in command:
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R46-10',to_date('07/05/10','DD/MM/RR'),122,'Airbridge and Aircraft',40,12,153,to_date('07/05/10','DD/MM/RR'),2,null,null,null,'H6-10',null,null,to_date('07/05/10','DD/MM/RR'),170,to_date('07/05/11','DD/MM/RR'),null,null,null,3,54,57,'Bob Chambers','Reported occurrences of this event type have been on the increase since the introduction of these differently configured aircraft.','Adverse trend of Pax Door impacting the airbridge causing damage.  ',null)
Error report:
SQL Error: ORA-01400: cannot insert NULL into ("AQD"."RM_RISK"."RISK_DESCRIPTION")
01400. 00000 -  "cannot insert NULL into (%s)"
*Cause:    
*Action:

Error starting at line 248 in command:
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R47-10',to_date('19/11/10','DD/MM/RR'),160,null,null,null,170,to_date('19/11/10','DD/MM/RR'),null,null,null,null,null,null,'F7-10',to_date('19/11/10','DD/MM/RR'),170,to_date('23/11/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'passenger screening risk',null)
Error report:
SQL Error: ORA-01400: cannot insert NULL into ("AQD"."RM_RISK"."RISK_DESCRIPTION")
01400. 00000 -  "cannot insert NULL into (%s)"
*Cause:    
*Action:

Error starting at line 249 in command:
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R6-10',to_date('15/01/10','DD/MM/RR'),122,'Ramp Vans',39,11,124,to_date('15/01/10','DD/MM/RR'),2,null,null,null,null,null,null,to_date('15/01/10','DD/MM/RR'),124,to_date('22/01/10','DD/MM/RR'),null,null,null,3,null,null,null,null,'No servicing requirement for ground vehicles',null)
Error report:
SQL Error: ORA-01400: cannot insert NULL into ("AQD"."RM_RISK"."RISK_DESCRIPTION")
01400. 00000 -  "cannot insert NULL into (%s)"
*Cause:    
*Action:

Error starting at line 250 in command:
Insert into RM_RISK (RISK_NO,DATE_IDENTIFIED,BUSINESS_UNIT_AFFECTED_ID,EQUIPMENT_INVOLVED,RISK_CATEGORY_ID,RISK_TYPE_ID,ENTERED_BY_ID,ENTERED_ON,POTENTIAL_CURRENT_ID,WR_PERIOD,WR_TYPE,WR_NUMBER,HAZARD_NO,OCCURRENCE_NO,FINDING_NO,LAST_REVIEWED_DATE,LAST_REVIEWED_BY_ID,NEXT_REVIEW_DATE,FEEDBACK,FEEDBACK_BY_ID,FEEDBACK_ENTERED_ON,RISK_STATUS_ID,OVERAL_CONTROL_EFECTIVENES_ID,RISK_TREND_ID,RISK_OWNER,RISK_TREND_COMMENTARY,RISK_TITLE,EVENTS_AND_DEVELOPMENTS) values ('R7-10',to_date('18/01/10','DD/MM/RR'),70,'Access stand',2,12,124,to_date('18/01/10','DD/MM/RR'),2,null,null,null,null,null,null,to_date('12/02/10','DD/MM/RR'),147,to_date('12/02/10','DD/MM/RR'),'Who gets this?  ',147,to_date('18/01/10','DD/MM/RR'),3,null,null,null,null,'Overstretching and falling',null)
Error report:
SQL Error: ORA-01400: cannot insert NULL into ("AQD"."RM_RISK"."RISK_DESCRIPTION")
01400. 00000 -  "cannot insert NULL into (%s)"
*Cause:    
*Action:
commited.
LPFA_1                                             
-------------------------------------------------- 
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         
Acceptable                                         

 40 rows selected

Open in new window

0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35872176
Interestingly, I found a copy of XE (10,2.0.1) and installed to local Win 7 PC. That did create the error.
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35882415
We'd be interested in any thoughts you may have as to how we managed to get it to work on that one machine. Is there sonme setting that could influence this?

Kelvin
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35882706
You might also like to check out my new quastion

http://www.experts-exchange.com/Database/Oracle/Q_27072738.html
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35882793
>>s there sonme setting that could influence this?

Unfortunately no.  The test I posted shouldn't work at all on any version.  Did you post my test case to Oracle in an SR?

They might be able to set up special tracing or run some low level queries to explain this.

I would be very interested to hear what they say.

0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35882899
Not as yet. I'm currently working off-site but believe we have a secong vm running Oracle 10. I want to determine whetherit is on the same physical server as the other and also try the test scripts there. That'll be next week. Meantime, thank you very much for your patience help.
0
 
LVL 22

Author Closing Comment

by:Kelvin Sparks
ID: 35882912
Extremely helpful, thank you
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35882919
No problem.

Please try to remember to post back what you find!  I'm really dying to know.
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35882937
Will do
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35920360
FYI, I found another VM with Oracle 10.2.0.1 on the same physical server. Created an empty db and ran that script - It also worked OK. We're looking at moving the VM to another server and trying it there - where our Oracle 11.2 vm is situated and the code fails
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35922960
wow...  this is definitely interesting.  I hope you find out what is doing this.  I can't wait to hear!  This is one of those "Its impossible" moments that appears to be possible.
0
 
LVL 22

Author Comment

by:Kelvin Sparks
ID: 35926670
We have two Hyper V servers for dev. One with Oracle 11 and with Oracle 10. All instances on the 10 server will run the code (is a real possibility that they are clones of each other - but don't know for sure as the IT guy who set them up has left). I am hoping to take a clone of one of the 10 vms and put it on the 11 Hyper V server and try it there, and then do the same to an 11 vm onto the 10 HV machine. We can then see if the behaviour is common to the server itself or just the vm. Will keep you posted.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now