Home » SQL & PL/SQL » SQL & PL/SQL » SQL INSERT INTO ERROR
SQL INSERT INTO ERROR [message #36916] Thu, 03 January 2002 20:45 Go to next message
Sandipta N Biswas
Messages: 7
Registered: December 2001
Junior Member
Hi,
I am facing the following problem at the time of inserting data from one table to another table. like this:
SQL> desc tmp;
Name Null? Type
------------------------------- -------- ----
EMPNO NUMBER(4)
NAME VARCHAR2(20)
AGE NUMBER(2)

SQL> desc persinfo;
Name Null? Type
------------------------------- -------- ----
EMPNO NUMBER(4)
NAME VARCHAR2(20)
AGE NUMBER(2)

SQL> insert into tmp values ( select * from persinfo);
insert into tmp values ( select empno, name, age from persinfo)
*
ERROR at line 1:
ORA-00936: missing expression

SQL> spool off
Hele.
Advance thanks.
sandipta

----------------------------------------------------------------------
Re: SQL INSERT INTO ERROR [message #36918 is a reply to message #36916] Thu, 03 January 2002 20:55 Go to previous messageGo to next message
Vinay Bajpai
Messages: 1
Registered: January 2002
Junior Member
just remove " values " word. It is culprit

----------------------------------------------------------------------
Re: SQL INSERT INTO ERROR [message #37841 is a reply to message #36916] Sat, 02 March 2002 00:11 Go to previous message
Stephen Milliken
Messages: 1
Registered: March 2002
Junior Member
I am trying to run the following statement and get the following error message - Syntax error in INSERT INTO statement.

The statement is : dbs.Execute " INSERT INTO tbl_Manag_Res_Journal(Date, Trans_No, Ledger, Description, Debit, Credit) VALUES(W_Date, Record_No, 'W_Ledger', 'W_Descriptor', W_Debit, W_Credit);"

Any advise please
Previous Topic: Differ in Join And Union
Next Topic: Table Space Name
Goto Forum:
  


Current Time: Tue Apr 23 12:36:11 CDT 2024