Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Connecting with C#, trying to use 'RETURNING'

Re: Connecting with C#, trying to use 'RETURNING'

From: <erich.keane_at_verizon.net>
Date: 10 Oct 2006 08:37:55 -0700
Message-ID: <1160494674.937607.3510@i3g2000cwc.googlegroups.com>


Sorry to self post, (and top post no less!), but I was an idiot and forgot the from clause in my select subquery statement.

erich.keane_at_verizon.net wrote:
> Ok, so I am attempting to retrieve a generated Primary Key from a
> query. Unfortunately, I am having a heck of a time getting the query
> to run.
>
> The below is an example query, used mostly just to test the syntax:
> INSERT INTO "SYSTEM"."DEPT" ("DEPTNO","DNAME","LOC") VALUES ((SELECT
> nvl(MAX("DEPTNO"),1-1)+1 ),:DNameCol,:LOCCol) returning "DEPTNO" into
> :DEPTNOCol
>
> The parameter :DEPTNOCol is set in C# (using Oracle.DataAccess) as an
> output parameter, but I still get the error: ORA-00923: FROM keyword
> not found where expected
>
> This site implies that I am doing it correctly, but I really am quite
> stuck: http://www.remote-dba.cc/10g_65.htm
>
> Any ideas/help would be grately appreciated.
Received on Tue Oct 10 2006 - 10:37:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US