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: INSERT with Sub-Query question! HELP, PLEASE!

Re: INSERT with Sub-Query question! HELP, PLEASE!

From: Zhang, Leon Lin <leonz_at_gdc.lucent.com>
Date: Thu, 21 Dec 2000 13:47:40 +0800
Message-ID: <3A41997C.61E9BB43@gdc.lucent.com>

Kian Lee,

Maybe the root cause to this problem is that you use sub query instead of 'expression' in the parentheses after 'values' word. According to 'Oracle8 Server SQL Reference', it can be only 'expression'.

Kian Lee wrote:
>
> Hi all,
>
> I am new to Oracle SQL I have run a SQL below and get the result like
> below.
>
> SQLWKS> insert into ter_expense_type
> 2> (expense_code, created_by)
> 3> values
> 4> ( (select value from parameter where item
> = 'EXPENSE_CODE'), 'user_name' );
>
> ( (select value from parameter where item
> = 'EXPENSE_CODE'), 'user_name' )
> *
> ORA-00936: missing expression
>
> The "expense_code" and "value" datatypes are same, NUMBER.
> I could't get help from the documentation.
>
> Please help.
>
> Thanks.
>
> Regards,
> Kian Lee
>
> Sent via Deja.com
> http://www.deja.com/
 

-- 
Leon L. Zhang
Email: lzhang1_at_lucent.com
Received on Wed Dec 20 2000 - 23:47:40 CST

Original text of this message

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