Skip to Main Content

SQL & PL/SQL

Announcement

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

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

problem in getting Scope_Identity in Oracle????

627801Mar 27 2008 — edited Mar 31 2008
Hi All,
i'm converting my website from connecting to SQL to Connect to Oracle DB and i'm reconfiguring the DataSets and TableAdapters for that .
i have function in a tableAdapter that insert in a table then get the SCOPE_IDENTITY() of the ID of the last inserted row .
This the Code that refer to SQL DB:

INSERT INTO [JobFunction] ([JobFunctionName]) VALUES (@JobFunctionName); SELECT SCOPE_IDENTITY()

And This the Code that refer to ORACLE DB:

INSERT INTO JOBFUNCTION
(JOBFUNCTIONNAME)
VALUES (:JOBFUNCTIONNAME);
SELECT JOBFUNCTION_SEQ.nextval
FROM dual

The proplem is the last code generate an error : ORA-00911 invaild character
that's because i use ; to separate the INSERT statment from SELECT statment
and if i remove the ; it generates another error : ORA-00933 sql command not properly ended !!!!!!!!!!
Please Help Meeeeeeeeeeeeeeeeeeeeeeeeee
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 28 2008
Added on Mar 27 2008
8 comments
2,210 views