View Single Post
 
Old May 6th, 2005, 01:56 PM
rajukurian rajukurian is offline
Authorized User
 
Join Date: May 2005
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

SELECT

       CASE
          WHEN (pgmcd1 IS NOT NULL) THEN pgmcd1 + space(1) + '|' + space(1) ELSE '' END +
       CASE
          WHEN (pgmcd2 IS NOT NULL) THEN pgmcd2 + space(1) + '|' ELSE '' END +
       CASE
          WHEN (pgmcd3 IS NOT NULL) THEN pgmcd3 + space(1) + '|' ELSE '' END +
        CASE
          WHEN (pgmcd4 IS NOT NULL) THEN pgmcd4 + space(1) + '|' ELSE '' END +
        CASE
          WHEN (pgmcd5 IS NOT NULL) THEN pgmcd5 + space(1) + '|' ELSE ''
       END
as pgmcd from Temp_DISPromo_GRP1



STILL I AM GETING THE RESULT LIKE..


================================================== =======

  | | | | |

A | |C | | E |

  |B | C | | E |





SOME OTHER SYNTAX I GUESS