hello hello wrote:

> when I execute the following SQL statement :
> insert into tax (chartid,rate) values ((select id from
> chart where accno = 2310),0.07)
>
> error message :
> Native error:    -5016
> Text:            [SAP AG][SQLOD32 DLL][SAP DB]Genernal
> error;-5016 POS(48) Missing delimiter: ).

Hi,

as the reference manual tells us:
<insert_statement> ::= 
  INSERT [INTO] <table_name> [(<column_name>,...)] VALUES
(<extended_expression>,...) [<duplicates_clause>]
| INSERT [INTO] <table_name> [(<column_name>,...)] <query_expression>
[<duplicates_clause>]

One has the chance to say
  VALUES (  any expression or DEFAULT or STAMP, but no SELECT....
                   followed by ',' and again any expression... )

or one can say
  SELECT ....

--> insert into tax (chartid,rate) 
      select id, 0.07 from chart where accno = 2310

Elke
SAP Labs Berlin

BTW: I am happy that my parents named me Elke, not hello ;-)

Reply via email to