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: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 21 Dec 2000 09:02:07 -0000
Message-ID: <977389270.26092.0.nnrp-10.9e984b29@news.demon.co.uk>

Version 8.1 allows queries to be used as expressions:

create table xxx (v1 varchar2(20), v2 varchar2(20)); table created

insert into xxx values ('xxx',(select user from dual)); 1 row created

select * from xxxx;

    'xxx,'JPL'

Perhaps this original poster is using an older version which does not support this mechanism.

--
Jonathan Lewis
Yet another Oracle-related web site:  http://www.jlcomp.demon.co.uk

Practical Oracle 8i:  Building Efficient Databases

Publishers:  Addison-Wesley
See a first review at:
http://www.ixora.com.au/resources/index.htm#practical_8i
More reviews at: http://www.jlcomp.demon.co.uk/book_rev.html



Peter Kallweit wrote in message <3A41B1F3.8C4EDF1A_at_iief.de>...

>Hallo Kian,
>
>Kian Lee wrote:
>>
>>
>> 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
>>
>
>For a insert you must decide to use values or subquery.
>You tried to use a combination.
Received on Thu Dec 21 2000 - 03:02:07 CST

Original text of this message

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