Home » SQL & PL/SQL » SQL & PL/SQL » help with analytical function to add extra lines
help with analytical function to add extra lines [message #254336] Thu, 26 July 2007 09:06 Go to next message
dusoo
Messages: 41
Registered: March 2007
Member
Hi there, i need to retrieve extra rows based on timeline that i can get from other table (tab2). Im sure, that ana.function can be used for this, have tried it, but im stuck...
thanks for any ideas

tab1
id,stime,value
1 1:30 51
1 2:30 64
2 1:00 21
2 2:00 11

tab2
times
1:00
1:30
2:00
2:30

i'd like to retrieve those also those missing lines for each id. So the result should be like this:

id,stime,value
1 1:00
1 1:30 51
1 2:00
1 2:30 64
2 1:00 21
2 1:30
2 2:00 11
2 2:30
Re: help with analytical function to add extra lines [message #254350 is a reply to message #254336] Thu, 26 July 2007 09:40 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
This is done by using an outer join, not analytical functions.
Re: help with analytical function to add extra lines [message #254352 is a reply to message #254350] Thu, 26 July 2007 09:44 Go to previous messageGo to next message
dusoo
Messages: 41
Registered: March 2007
Member
U are totaly right ... thanks Smile
Re: help with analytical function to add extra lines [message #254354 is a reply to message #254352] Thu, 26 July 2007 09:51 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
well, not quite, maybe
Testing it now, but running into troubles..
Re: help with analytical function to add extra lines [message #254401 is a reply to message #254352] Thu, 26 July 2007 12:13 Go to previous messageGo to next message
Volder
Messages: 38
Registered: April 2007
Location: Russia
Member
click
Re: help with analytical function to add extra lines [message #254403 is a reply to message #254401] Thu, 26 July 2007 12:17 Go to previous message
joy_division
Messages: 4644
Registered: February 2005
Location: East Coast USA
Senior Member
Now, if we can only find a way to merge topics cross-posted to forums hosted by different sites...
Previous Topic: How to capture the results of a dynamic SQL
Next Topic: Catching ORA-00054 properly
Goto Forum:
  


Current Time: Sun Dec 11 08:33:15 CST 2016

Total time taken to generate the page: 0.12513 seconds