Home » SQL & PL/SQL » SQL & PL/SQL » hard sql urgent
hard sql urgent [message #227660] Wed, 28 March 2007 23:24 Go to next message
reyazan
Messages: 53
Registered: February 2005
Member
i have a table that contain time information for 1 day in HOUR and MINUTE like below
TIME (HH24MI)

0001
0002
0003
0005
0006
0007
0008
0010
** etc

i want to extract only missed time in above table
for example

0004
0009 etc




Re: hard sql urgent [message #227662 is a reply to message #227660] Wed, 28 March 2007 23:27 Go to previous messageGo to next message
BlackSwan
Messages: 25034
Registered: January 2009
Location: SoCal
Senior Member
>hard sql urgent
why is it urgent for me to provide this answer to YOU?
Re: hard sql urgent [message #227674 is a reply to message #227662] Thu, 29 March 2007 00:41 Go to previous messageGo to next message
pavuluri
Messages: 247
Registered: January 2007
Senior Member
see this

select * from (select num1 from (select to_char(rownum+1-1,'fm0009') as num1 from dual connect by level<=10)
where num1<=(select max(num) from srinu1111)) where num1 not in (select num from srinu1111)

script

create table srinu1111( num varchar(15));
begin

insert into srinu1111 values('0001');
insert into srinu1111 values('0002');
insert into srinu1111 values('0003');
insert into srinu1111 values('0005');
insert into srinu1111 values('0006');
insert into srinu1111 values('0007');
insert into srinu1111 values('0008');
insert into srinu1111 values('0010');

end;


thanks
srinivas
Re: hard sql urgent [message #227679 is a reply to message #227660] Thu, 29 March 2007 00:48 Go to previous message
flyboy
Messages: 1832
Registered: November 2006
Senior Member
Seems to me very similar to this thread. Just adjust it.
Previous Topic: data encryption
Next Topic: Conditional Query
Goto Forum:
  


Current Time: Sat Dec 03 14:00:39 CST 2016

Total time taken to generate the page: 0.06466 seconds