insert into [message #210333] |
Wed, 20 December 2006 07:07 |
webadministrator
Messages: 45 Registered: October 2005
|
Member |
|
|
hello,
i want to insert values to a field called ( comment ) in a table called ( group ) only when code_Comm is = 6
this is what i wrote:
insert when ( code_Comm = 6 )
then
into group (comment)
values('good')
its giving me the following error: ORA - 00925: missing INTO keyword.
what am i doing wrong?
thank you in advance.
|
|
|
|
|
Re: insert into [message #210341 is a reply to message #210340] |
Wed, 20 December 2006 07:38 |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
GROUP and COMMENT are invalid names for Oracle objects, unless you used double quotes when creating them and every time you want to reference them. Bad idea.
|
|
|
Re: insert into [message #210343 is a reply to message #210333] |
Wed, 20 December 2006 07:43 |
flyboy
Messages: 1903 Registered: November 2006
|
Senior Member |
|
|
hello,
it seems to me you do not want to insert new rows to the table, just update one column based on values of another column. Something like update "group" set "comment" = 'good' where code_comm = 6; If not, where will you get the code_comm value from?
It was not a good idea to name your table and column with Oracle keyword. Have to put it into doublequotes when accessing it.
|
|
|