Home » SQL & PL/SQL » SQL & PL/SQL » INSERT statement (no error, but not working?) (Oracle XE 10g, Windows XP Professional)
INSERT statement (no error, but not working?) [message #336305] Fri, 25 July 2008 10:36 Go to next message
mbellamy
Messages: 4
Registered: July 2008
Junior Member
Hello,

Below are tables I have and their respective columns:

table name: mtest
sampyear
plotnum
spcode
sptype

table name: a3a_species
species_co
species_ty

I have populated the values in sampyear, plotnum, and spcode with successful insert statements. I would like to populate the sptype code with the species_ty values from a3a_species. The spcode and species_co values are the same between the two tables. I have tried the following script:

insert into mtest (sptype)
select species_ty from a3a_speces;


My results say that 92 rows were inserted. However, when I view my 'mtest' table (even after selecting refresh) the values in the column still say "null". If anyone has any idea what I could be doing wrong, I would really appreciate it - thanks! Smile

[Updated on: Fri, 25 July 2008 10:37]

Report message to a moderator

Re: INSERT statement (no error, but not working?) [message #336306 is a reply to message #336305] Fri, 25 July 2008 10:39 Go to previous messageGo to next message
BlackSwan
Messages: 25033
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & follow posting guidelines as stated in URL above

Issuing a
COMMIT
might help; then again it might not.
It is difficult to know based upon your post.
Re: INSERT statement (no error, but not working?) [message #336313 is a reply to message #336305] Fri, 25 July 2008 11:11 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
In addition I think what you want to do is an update and not an insert.

Regards
Michel
Re: INSERT statement (no error, but not working?) [message #336314 is a reply to message #336313] Fri, 25 July 2008 11:11 Go to previous message
mbellamy
Messages: 4
Registered: July 2008
Junior Member
Thankyou, I will try that!

Megan
Previous Topic: Date range SQL CURSOR
Next Topic: Query
Goto Forum:
  


Current Time: Sat Dec 03 09:58:58 CST 2016

Total time taken to generate the page: 0.08560 seconds