Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Oracle sequence while insert.

Hi,
Anybody has an experience to use oracle sequence while inserting. what is the way to get the sequence which is defined in oracle to use with TOS database components?
regards,
sebastianr
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Additional Columns are designed to handle db columns which needs instructions but where there are no datas from the row.
In your component schema, you have EMP_NAME.
Configure additional column like in the picture added.

Regards,
Michaël.

View solution in original post

10 Replies
Anonymous
Not applicable
Author

Hello,
Use the additional columns table.
Regards,
Anonymous
Not applicable
Author

Dear Mhirt,

Using "Additional Columns" option, how can use oracle sequence? I dont want generate the numbers in TOS itself. I need to get the sequence which is defined in Oracle and increment the value while inserting.
For eg. insert into employee (EMP_SEQ_ID, EMP_NAME) values(EMP_SEQ.NEXTVAL, 'Sebastian');
Here i am using Oracle sequence EMP_SEQ. Same way i want it to be done.
If your reply addressed my query, how can it be achieved with "Additional Columns" option.

Thanks.
Anonymous
Not applicable
Author

Additional Columns are designed to handle db columns which needs instructions but where there are no datas from the row.
In your component schema, you have EMP_NAME.
Configure additional column like in the picture added.

Regards,
Michaël.
Anonymous
Not applicable
Author

Hello,
I have a problem using an oracle sequence to get value for my primary key.
I added an additional column but it doesn't work
there you ca find all screenshot.
The error is in english "sequence number not allowed here"
I hope that you can help me
Thx
0683p000009MBPt.jpg 0683p000009MBQq.jpg 0683p000009MBQv.jpg 0683p000009MBIj.jpg
Anonymous
Not applicable
Author

OK I've changed the SQL expression in my tOracleOutput additional column to "select hibernate_sequence.nextval from dual" and now a new error seems to appear :"ORA-00936: emissing expression"
Is it better or worst?
Anonymous
Not applicable
Author

I'm really sorry but my issue comes from my sql expression. In fact the right expression is "hibernate_sequence.nextval" and now all works fine
thx
Anonymous
Not applicable
Author

I'm really sorry but my issue comes from my sql expression. In fact the right expression is "hibernate_sequence.nextval" and now all works fine
thx

Hello all,
when I type this, I've got the next error: java.sql.SQLException: ORA-02287: sequence number not allowed here
Please, could you help me.
Thanks in advance,
Gracia.
Anonymous
Not applicable
Author

I'm really sorry but my issue comes from my sql expression. In fact the right expression is "hibernate_sequence.nextval" and now all works fine
thx

Hello all,
when I type this, I've got the next error: java.sql.SQLException: ORA-02287: sequence number not allowed here
Please, could you help me.
Thanks in advance,
Gracia.
I've found the problem: I can't use the sequence over a Key Field.
Thanks,
Gracia.
Anonymous
Not applicable
Author

Hi,
this call of sequence work fine when you use the column name in upper format