SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 INSERT TO
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

rmcox81
Starting Member

3 Posts

Posted - 05/17/2013 :  01:21:57  Show Profile  Reply with Quote
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

India
52317 Posts

Posted - 05/17/2013 :  01:41:05  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000