473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Insert error: ORA-00936: missing expression

1 CREATE TABLE MyEmp
2 (
3 Empno NUMBER(4)
4 CONSTRAINT MyEmp_Empno_PK PRIMARY KEY
5 CONSTRAINT MyEmp_Empno_CHK CHECK( Empno BETWEEN 1 AND 9999 ),
6 Ename VARCHAR2(9)
7 CONSTRAINT MyEmp_Ename_NN NOT NULL
8 CONSTRAINT MyEmp_Ename_CHK CHECK ( Ename =UPPER(Ename)),
9 Job VARCHAR2(9)
10 CONSTRAINT MyEmp_Job_CASECHK CHECK ( Job =UPPER(Job))
11 CONSTRAINT MyEmp_Job_DESIGCHK
12 CHECK(Job IN('MANAGER','SALESMAN','ANALYST','CLERK','PRESIDE NT',NULL)),
13 Mgr NUMBER(4)
14 CONSTRAINT MyEmp_Mgr_FK REFERENCES MyEmp(Empno),
15 Hiredate DATE DEFAULT SYSDATE,
16 Sal NUMBER(7,2)
17 CONSTRAINT MyEmp_Sal_CHK CHECK ( Sal BETWEEN 2000 AND 100000),
18 Comm NUMBER(7,2) DEFAULT 0,
19 Deptno NUMBER(2)
20 CONSTRAINT MyEmp_Deptno_FK REFERENCES Dept(Deptno)
21* )
SQL> /

Table created.

SQL> INSERT INTO MyEmp
2 VALUES (
3 &EMPNO,
4 '&ENAME',
5 '&JOB',
6 &MGR,
7 '&HIREDATE',
8 &SAL,
9 &COMM,
10 &DEPTNO
11 )
12 /
Enter value for empno: 1000
Enter value for ename: NAME01
Enter value for job: PRESIDENT
Enter value for mgr:
Enter value for hiredate:
Enter value for sal:
Enter value for comm:
Enter value for deptno: 10
,
*
ERROR at line 6:
ORA-00936: missing expression


pls provide solution
Aug 15 '11 #1
1 13789
rski
700 Expert 512MB
Set null for below columns

Enter value for mgr: NULL
Enter value for hiredate: NULL
Enter value for sal: NULL
Enter value for comm: NULL
Sep 5 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Howard Hinnant | last post by:
I recently asked for a survey of multimap insert with hint behavior, in support of a paper I'm writing concerning lwg issue 233. My sincere thanks to Beman Dawes, Raoul Gough, Russell Hind, Bronek...
6
by: Mark P | last post by:
Some time ago I posted here about inserting into a set with a hint: ...
14
by: serge | last post by:
I have a scenario where two tables are in a One-to-Many relationship and I need to move the data from the Many table to the One table so that it becomes a One-to-One relationship. I need to...
2
by: Ford Desperado | last post by:
I've been reading the docs and playing around, but I'm still not getting the difference. For instance, create table a(i int check(i>0)) create table a_src(i int) go create unique index ai on...
16
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
4
by: Chris Kratz | last post by:
Hello all, We have run into what appears to be a problem with rules and subselects in postgres 7.4.1. We have boiled it down to the following test case. If anyone has any thoughts as to why...
2
by: Geoffrey KRETZ | last post by:
Hello, I'm wondering if the following behaviour is the correct one for PostGreSQL (7.4 on UNIX). I've a table temp_tab with 5 fields (f1,f2,f3,...),and I'm a launching the following request :...
3
by: MP | last post by:
Hi Posted this several hours ago to another ng but it never showed up thought i'd try here. using vb6, ado, .mdb, jet4.0, no access given table tblJob with field JobNumber text(10) 'The...
6
by: lenygold via DBMonster.com | last post by:
Hi everybody: What is the best way to I have 10 tables with similar INSERT requiremnts. INSERT INTO ACSB.VAATAFAE WITH AA(AA_TIN, AA_FILE_SOURCE_CD, .AA_TIN_TYP) AS ( SELECT AA_TIN,...
1
by: EJO | last post by:
with sql 2000 enterprise Trying to build a stored procedure that will take the rows of a parent table, insert them into another table as well as the rows from a child table to insert into...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.