Home » SQL & PL/SQL » SQL & PL/SQL » Selecting/Inserting Missing values (Oracle 11gR2 ,Solaris)
Selecting/Inserting Missing values [message #644874] Thu, 19 November 2015 04:31 Go to next message
tigsav
Messages: 49
Registered: April 2012
Member
Hi Experts,
I need a help in inserting missing data .

PFB the DDL for test case;
create table test1
(id number,
value number,
dt_value date);


insert into test1 values (1,2,SYSDATE-5);
insert into test1 values (1,4,SYSDATE-4);
insert into test1 values (1,4,SYSDATE);
commit;

I need the output from same table along with missing dates

i.e I am having data for 15th,16th, and 19th.
for 17,18 the data(value) should be present as zero.
Re: Selecting/Inserting Missing values [message #644875 is a reply to message #644874] Thu, 19 November 2015 04:38 Go to previous messageGo to next message
John Watson
Messages: 9003
Registered: January 2010
Location: Global Village
Senior Member
Would this be a college homework assignment? Try these techniques,
http://www.orafaq.com/forum/mv/msg/95011/291171/#msg_291171

[Updated on: Thu, 19 November 2015 04:38]

Report message to a moderator

Re: Selecting/Inserting Missing values [message #645014 is a reply to message #644875] Mon, 23 November 2015 10:57 Go to previous message
tigsav
Messages: 49
Registered: April 2012
Member
Thanks a lot John.
No,It was not a HW Assignment. Its a particular scenario which we were facing.

The scenario on a similar lines would be capturing the time a person has run in a day. However we are not getting data from cloud when the person does-not run for the day thereby causing missing data.



Regards,
Tigsav
Previous Topic: How to get first and last day for 13 month back
Next Topic: Insert into multiple blocks
Goto Forum:
  


Current Time: Sat Jul 11 00:41:29 CDT 2026