Skip to Main Content

DevOps, CI/CD and Automation

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Can't use the Studio 11 debugger as it stops while reading libc_psr.so.1

807578Oct 17 2006 — edited Oct 19 2006
Hi,
I have installed Studio 11 onto my Sun V490 running Solaris 9 9/05 with Patch cluster from Sep/14/06
I can't use the debugger as it stops while reading libc_psr.so.1:-

Reading ld.so.1
Reading libc.so.1
Reading libdl.so.1
Reading libc_psr.so.1


I have loaded the latest Studio 11 patches :-
120760-09
120761-02
121015-02
121017-04
121023-02

I can usr /opt/studio11/SUNWspro/bin/sunstudio and work through the Tutorial up to the point I need the debugger.
Any ideas how I can get going?
It all works fine on my Solaris 10 v20z at home :-)

Cheers
Richard.

Comments

21205
Answer
I think this will do the same
SQL> with t1 as (select 1 id, 'a' vol, 100 amount from dual union all
  2              select 1 id, 'c' vol, 200 amount from dual union all
  3              select 1 id, 'd' vol, 300 amount from dual union all
  4              select 2 id, 'b' vol, 400 amount from dual),
  5       t2 as (select 'b' vol, 1 order_index from dual union all
  6              select 'd' vol, 2 order_index from dual union all
  7              select 'a' vol, 3 order_index from dual union all
  8              select 'c' vol, 4 order_index from dual)
  9  select t1.id
 10      , t2.vol
 11      , nvl (t1.amount, 0)
 12      , t2.order_index
 13    from t1
 14        partition by (id)
 15        right outer
 16        join t2
 17        on (t1.vol = t2.vol)
 18  order by t1.id, order_index
 19  /

        ID V NVL(T1.AMOUNT,0) ORDER_INDEX
---------- - ---------------- -----------
         1 b                0           1
         1 d              300           2
         1 a              100           3
         1 c              200           4
         2 b              400           1
         2 d                0           2
         2 a                0           3
         2 c                0           4

8 rows selected.
(if you're on Oracle 10)

missed the final ORDER BY

Edited by: Alex Nuijten on Jun 19, 2009 10:23 AM
Marked as Answer by Boneist · Sep 27 2020
Boneist
Ooh, that's very nifty!

Thanks... guess I'm going to have to get past my aversion to the ANSI join syntax, aren't I?! That's a very useful trick, and one I wasn't aware of.
21205
:)

and here's the Tahiti link: http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#i2177515

(to up your Tahiti-Fu skills ;) )
Nicolas Gasparotto
What about code from old school time ?
SQL> with t1 as (select 1 id, 'a' vol, 100 amount from dual union all
  2              select 1 id, 'c' vol, 200 amount from dual union all
  3              select 1 id, 'd' vol, 300 amount from dual union all
  4              select 2 id, 'b' vol, 400 amount from dual),
  5       t2 as (select 'b' vol, 1 order_index from dual union all
  6              select 'd' vol, 2 order_index from dual union all
  7              select 'a' vol, 3 order_index from dual union all
  8              select 'c' vol, 4 order_index from dual)
  9  select a.id, b.vol,sum(decode(a.vol,b.vol,a.amount,0)) amount
 10  from   t1 a, t2 b
 11  group by a.id, b.vol,b.order_index
 12  order by a.id, b.order_index;

        ID V     AMOUNT
---------- - ----------
         1 b          0
         1 d        300
         1 a        100
         1 c        200
         2 b        400
         2 d          0
         2 a          0
         2 c          0

8 rows selected.
Nicolas.
Aketi Jyuuzou
575147

I like Left Join better than Right Join ;-)
21205
Aketi Jyuuzou wrote:
I like Left Join better than Right Join ;-)
... we aim to please:
SQL> with t1 as (select 1 id, 'a' vol, 100 amount from dual union all
  2              select 1 id, 'c' vol, 200 amount from dual union all
  3              select 1 id, 'd' vol, 300 amount from dual union all
  4              select 2 id, 'b' vol, 400 amount from dual),
  5       t2 as (select 'b' vol, 1 order_index from dual union all
  6              select 'd' vol, 2 order_index from dual union all
  7              select 'a' vol, 3 order_index from dual union all
  8              select 'c' vol, 4 order_index from dual)
  9  select t1.id
 10      , t2.vol
 11      , nvl (t1.amount, 0)
 12      , t2.order_index
 13    from t2 left outer
 14        join
 15        t1
 16        partition by (id)
 17        on (t1.vol = t2.vol)
 18  order by t1.id, order_index
 19  /

        ID V NVL(T1.AMOUNT,0) ORDER_INDEX
---------- - ---------------- -----------
         1 b                0           1
         1 d              300           2
         1 a              100           3
         1 c              200           4
         2 b              400           1
         2 d                0           2
         2 a                0           3
         2 c                0           4

8 rows selected.
;)
1 - 6
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 16 2006
Added on Oct 17 2006
4 comments
129 views