Talk:PL/SQL FAQ

From Oracle FAQ
Jump to: navigation, search

How to call IN OUT PARAMETER IN PL/SQL GIVE EXAMPLE?

query for Probability Sql[edit]

hi,

i have the following table with this columns

TicketId Attraction Time


T1         A1       7.00 AM
T1         A1       8.00 AM
T1         A1       9.00 AM  
    
T1         A2      7.30 AM
T1         A2      8.30 PM


I need the out put like this..


T1 A1 7.00 AM | A2 7.30 AM

T1 A1 7.00 AM | A2 8.30 PM

T1 A1 8.00 AM | A2 7.30 AM

T1 A1 8.00 AM | A2 8.30 PM

T1 A1 9.00 AM | A2 7.30 AM

T1 A1 9.00 AM | A1 8.30 PM


have to create a Probability.. is it possible ??? if yes.. help me out...

tnx...

Use this query


SELECT a.TicketId||' '||a.Attraction||' '||a.Time||' '||'|'||b.Attraction||' '||b.Time "EXP" FROM test_poss A,test_poss B WHERE A.TicketId = B.TicketId AND A.Attraction <> 'A2' AND b.Attraction = 'A2' order by a.TicketId,a.Attraction,a.Time