Home » SQL & PL/SQL » SQL & PL/SQL » inserting values into table
inserting values into table [message #38531] Wed, 24 April 2002 19:00 Go to next message
Sid
Messages: 38
Registered: May 1999
Member
I want to insert values into an ord table.
The values I want are in the item table they range from 600 and 699. These values are in ORACLE demo.

insert into ord( ordid, itemid, prodid, actualprice, qty, itemtot)
select * from demo.item
where item.ordid between 600 AND 699;

*
ERROR at line 3:
ORA-00904: invalid column name
Re: inserting values into table [message #38535 is a reply to message #38531] Thu, 25 April 2002 06:02 Go to previous message
Epe
Messages: 99
Registered: March 2002
Member
Hello,

I suppose that "demo" is a schema ?
If so, I don't think you should use "item.ordid" in the where clause. You could try with "demo.item.ordid", but it will surely work if you use an alias for the table demo.item :
"insert into ord(ordid,itemid,prodid,acutalprice,qty,itemtot)
select * from demo.item di
where di.ordid between 600 and 699;"
AND if you have rights to select on the demo schema...

Success,

epe
Previous Topic: what is the rowid type ?
Next Topic: Calling Procedure in another schema
Goto Forum:
  


Current Time: Fri Apr 19 18:33:26 CDT 2024