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 -> Tough One: How do u denormailize a table via a view, if column is text not numb

Tough One: How do u denormailize a table via a view, if column is text not numb

From: johnthan <jthn342_at_hotmail.com>
Date: 30 Oct 2001 11:47:08 -0600
Message-ID: <3bdee6fe$0$14833$45beb828@newscene.com>

We have a table A as such:

REQ LINE_NUM DESCP

      9        10000        PED IS OFF
      9        20000        SO PROCEED 
      9        30000        WITH X


that needs to be joined to a table B as such

REQ location date

9 LA 01/01/01

to produce

REQ     location           date                 DESCP

9               LA              01/01/01          PED IS OFF SO PROCEED WITH X


(the app that creates the table A only allows x number of characters per column if DESCP is longer than that it creates additional rows until whole DESCP is stored)

I know how to denormalize a table if the column that is denormalized is a number e.g.
SELECT a,b,
sum(decode(y, z, 99, 0)),
sum(decode(y, z, 88, 0))
FROM TB1
       GROUP BY a,b

but what if its a varchar?

We need this done dynamically via a view

Any ideas?      Received on Tue Oct 30 2001 - 11:47:08 CST

Original text of this message

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