Help
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Help

  1. #1
    Join Date
    Aug 2008
    Posts
    1

    Help

    Could someone tell me what this statement is doing?

    AND CASE WHEN pcl.clec_dspch_type_cd = ''ZZZZZZ''
    THEN ''ZZZZZZ''
    ELSE DECODE(SUBSTR(pcl.clec_dspch_type_cd, 4, 1), NULL, SUBSTR(dm.dspch_type_cd, 1, 3)
    , DECODE(dm.prod_id, 1, ''ZZZZZZ'', dm.dspch_type_cd))
    END = pcl.clec_dspch_type_cd

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    3,999
    I'm guessing that the section "pcl.clec_dspch_type_cd = ''ZZZZZZ''" is only there so that the else clause would fire when code ZZZZZZ does not appear. Its way to filter the logic based on the data.
    this space intentionally left blank

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width