File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Oracle/OAS and the fly likes Problem creating surrogate key Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Problem creating surrogate key" Watch "Problem creating surrogate key" New topic

Problem creating surrogate key

Atanas The dude

Joined: Mar 30, 2011
Posts: 1
I am trying to create a surrogate key so for that purpose I have this sequence:

but when I try to create the following trigger:

I get IN- or OUT-parameter is missing at index:: 1. Any idea why this happens?
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1141

Atanas The,
You need to change the body of the trigger.
A simple Internet search for the terms "oracle", "trigger", "nextval" will provide the answer.
Try the following:

Good Luck,
I agree. Here's the link:
subject: Problem creating surrogate key
It's not a secret anymore!