-
DB insert problem
Hi
I got a table called S and it looks like this:
snr varchar2(5)
sname varchar2(15)
status number(10)
city varchar2(15)
When I try to do this insert:
insert into S (
snr, sname, status, city)
values(
s1, 'smith', 20, 'London')
;
I get the following error message:
ERROR at line 4:
ORA-00984: column not allowed here
What is wrong? What does this mean?
Please help me
-
-
it is just a value to be inserted into the snr column
-
put quotes round it
Code:
SQL> create table s (snr varchar2(5), sname varchar2(10), status number(10), city varchar2(10));
Table created.
SQL> insert into S
(snr, sname, status, city)
values
('s1', 'smith', 20, 'London');
2 3 4
1 row created.
SQL> rollback;
Rollback complete.
SQL> insert into S (
snr, sname, status, city)
values(
s1, 'smith', 20, 'London')
; 2 3 4 5
s1, 'smith', 20, 'London')
*
ERROR at line 4:
ORA-00984: column not allowed here
Last edited by davey23uk; 10-25-2004 at 11:30 AM.
-
Thanks a lot. Not it's working.
/Stefan
-
Re: DB insert problem
Originally posted by netchtech
insert into S (snr, sname, status, city)
values ('s1', 'smith', 20, 'London');
Are you saying that this gives you the following error?
"ERROR at line 4: ORA-00984: column not allowed here"
-
i'm guessing he meant "now" its working
-
Originally posted by davey23uk
i'm guessing he meant "now" its working
Right, I should have guessed that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|