Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: INSERT with Sub-Query question! HELP, PLEASE!
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.comReceived on Wed Dec 20 2000 - 23:47:40 CST