Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: another mental block - Help still wanted Pleeeeease!!!

Re: another mental block - Help still wanted Pleeeeease!!!

From: Jan van Mourik <jmourik_at_yahoo.com>
Date: 5 Nov 2003 13:59:05 -0800
Message-ID: <ffe966de.0311051359.2dbd152b@posting.google.com>


> But what I need is
>
>
> N_ID V_ V_T V_VAL
> --------- -- --- ---------
> 1111 AV TLL 150
> 2222 AV TLP 100
> 3333 AV TQD 100
> 4444 AV 100
> 5555 AJ RDL 120
> 6666 AJ RPX 200
> 7777 AJ RPN 125
>

Don't know where this comes from:
> 6666 AJ RPX 200
but the rest could be:
jvmo_at_ids9i> l

  1  select n.n_id,
  2         n.v_cat,
  3         n.v_type,
  4         nvl((select v1.v_val from tclval v1 where n.v_cat =
                                         v1.v_cat and v1.v_type = n.v_type)
  5            ,(select v2.v_val from tclval v2 where n.v_cat =
                                         v2.v_cat and v2.v_type is null)
  6            )  as val2

  7 from tclnvv n
  8* order by 1
jvmo_at_ids9i> /

      N_ID V_ V_T VAL2
---------- -- --- ----------

      1111 AV TLL        150
      2222 AV TLP        100
      3333 AV TQD        100
      4444 AV            100
      5555 AJ RDL        120
      6666 AJ RPX
      7777 AJ RPN        125

7 rows selected.

Of course, insert into tclval values ('AJ',null,200); will get you the result set you printed :-)

jan Received on Wed Nov 05 2003 - 15:59:05 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US