Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 INSERT TO

Author  Topic 

rmcox81
Starting Member

3 Posts

Posted - 2013-05-17 : 01:21:57
Whats wrong with this statement?
INSERT INTO employees

VALUES

(201, Robert, Cox, robertcox1@yahoo.com, 50000,

5, 102-291-1111, sysdate);


data types are: number, varchar2, varchar2, varchar2, varchar2, number, varchar2, date.


Error starting at line 1 in command:
INSERT INTO employees
VALUES
(201, Robert, Cox, robertcox1yahoocom, 50000,
5, 1022911111, sysdate)
Error at Command Line:3 Column:22
Error report:
SQL Error: ORA-00984: column not allowed here
00984. 00000 - "column not allowed here"
*Cause:
*Action:

Side note: when it says "error at command Line: 3 Column: 22" that means three lines down twenty two characters over or is that wrong?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-05-17 : 01:41:05
you're using Oracle and this is MS SQL Server forum

In SQL Server we do it as this

INSERT INTO employees

VALUES

(201, 'Robert', 'Cox', 'robertcox1@yahoo.com', '50000',

5, '102-291-1111', sysdate);


you can try this
In case it doesnt work well in Oracle try your luck @ some oracle forums

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -