Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Pull the data from the column where it has 0's in the date field

1058268Aug 18 2016 — edited Aug 18 2016

Hi everyone,

I am working on Oracle 11g DB and i am using plsql allround automation tool.

I am trying to pull the data where the credit card expiration date column has 00/0000

I tried to create the tables and insert the data but i am getting an error while i am inserting the data

create table payment

(contract          number(10),

expiration_date     date);

insert into payment values (100,00/00/0000);

and i am getting ORA-00932: inconsistent datatypes: expected Date got number

but when i enter the data like this                insert into payment values (100,'01-JAN-2016');   it is successful

select * from payment

   CONTRACTEXPIRATION_DATE
11001/1/2016

All i want is to pull the data where that card expiration date column is having 00/0000

Any help is great appreciated

Thank you guys.

This post has been answered by CarlosDLG on Aug 18 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 15 2016
Added on Aug 18 2016
16 comments
1,179 views