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!

Can we use lead and lag with MODEL clause

NicloeiWJul 24 2007 — edited Jul 30 2007

Hi,

I have data as shown below;

1	1/1/2007	3/1/2007	0.5
1	4/1/2007	5/1/2007	0.5

date is in form of mm.dd.yyyy

to find the gaps in the date i would be using lead and lag functions,

so i would get output as follows

1	1/1/2007	3/1/2007	0.5
1 3/1/2007 4/1/2007 1   gap record
1	4/1/2007	5/1/2007	0.5

My question 
1. is it possible to use MODEL clause with lead and lag functions, or we have to use analytical functions only,

2. If we use analytical functions how to show missing record for that gap ??

kindly help me
Regards,
nic

Message was edited by: 
        Nicloei W                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 27 2007
Added on Jul 24 2007
49 comments
1,671 views