Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2002
    Location
    Minneapolis, MN
    Posts
    253

    Unanswered: Assign Column Name in CASE Statement

    Call me stupid (no, please), but forgot how to assign a name to an output column in this CASE statrement:

    CASE
    WHEN COALESCE(Length(AIM.AIMRETRIEVEDITEM.ImageFront), 0) = 0
    THEN 2 --AS --'AVAILABLEFLAG'
    ELSE 1 --AS --'AVAILABLEFLAG'

    I'm so ashamed...

    Help??
    Anthony Robinson

    "If I'm curt with you, it's because time is a factor here. I think fast, I talk fast, and I need you guys to act fast if you want to get out of this. So, pretty please - with sugar on top..."

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    I believe this is what you want:

    CASE
    WHEN COALESCE(Length(AIM.AIMRETRIEVEDITEM.ImageFront), 0) = 0
    THEN 2
    ELSE 1 END AS AVAILABLEFLAG

    HTH

    Andy

Posting Permissions

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