Re: Report Builder 3.0 and Line Feeds

From: <rtproffitt_at_my-deja.com>
Date: Tue, 06 Jul 1999 21:08:58 GMT
Message-ID: <7ltr90$pbr$1_at_nnrp1.deja.com>


It's messy, but you could have a series of Decode statements in the Select

Select
  Decode( NVL(addr1, '~x~'),

      '~x~', addr2,
         Decode( NVL(addr2, '~y~'),
            '~y~', addr1, Addr1 || chr(10) || addr2
         )

   ) as MyAddressList
from Mytable
where ....etc. etcc...

Reads like this:
- When addr1 is null, return dummy code ~x~

  • When addr2 is null, return dummy code ~y~
  • When addr1 is null, then just return addr2.
  • When addr1 is not null, then check addr2
    • When addr2 is null, just return addr1
    • When addr2 is not null, concatenate addr1 and addr2 using linefeed and return the new string.

Usual caveats apply, be careful about exceeding 2000 bytes, etc.

Good Luck,
Robert Proffitt
Beckman Coulter

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Tue Jul 06 1999 - 23:08:58 CEST

Original text of this message