Home » SQL & PL/SQL » SQL & PL/SQL » query to display employee whose code is 03 is not inserted (11g )
query to display employee whose code is 03 is not inserted [message #684828] |
Sat, 04 September 2021 02:38 |
|
glmjoy
Messages: 187 Registered: September 2011 Location: KR
|
Senior Member |
|
|
I want to display employees whose code 03 is not inserted
CREATE TABLE TBAL
(
EMP_CODE VARCHAR2(6),
LV_DATE DATE ,
LV_CODE VARCHAR2(4) ,
LV_YEAR NUMBER(4))
insert into TBAL values('121027','01-JAN-2021','01',2021);
insert into TBAL values('121027','01-JAN-2021','02',2021);
insert into TBAL values('121027','01-JAN-2021','03',2021);
insert into TBAL values('121028','01-JAN-2021','01',2021);
insert into TBAL values('121028','01-JAN-2021','02',2021);
insert into TBAL values('121029','01-JAN-2021','01',2021);
insert into TBAL values('121029','01-JAN-2021','02',2021);
insert into TBAL values('121026','01-JAN-2021','01',2021);
insert into TBAL values('121026','01-JAN-2021','02',2021);
insert into TBAL values('121026','01-JAN-2021','03',2021);
|
|
|
|
|
|
Re: query to display employee whose code is 03 is not inserted [message #684832 is a reply to message #684828] |
Sat, 04 September 2021 09:33 |
|
Michel Cadot
Messages: 68665 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
Michel Cadot wrote on Wed, 28 July 2021 10:38
Please format your post as explained in How to use [code] tags and make your code easier to read, and align the column in result.
And test your test case before posting it:
...
SQL> CREATE TABLE TBAL
2 (
3 EMP_CODE VARCHAR2(6),
4 LV_DATE DATE ,
5 LV_CODE VARCHAR2(4) ,
6 LV_YEAR NUMBER(4))
7 /
Table created.
SQL> insert into TBAL values('121027','01-JAN-2021','01',2021);
insert into TBAL values('121027','01-JAN-2021','01',2021)
*
ERROR at line 1:
ORA-01858: a non-numeric character was found where a numeric was expected
|
|
|
|
|
Goto Forum:
Current Time: Sat Jun 29 06:30:20 CDT 2024
|