Convert NULL date to Y/N Flag

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mwittekiend
    New Member
    • Mar 2010
    • 1

    Convert NULL date to Y/N Flag

    I am trying to convert a NULL date to a Y/N flag. It is giving me a conversion error. Here is the code. Any help is appreciated. Thanks
    'CommitDateTime Flag' = (case when CommitDateTime IS NULL then 'Y'
    else 'N'
    end)
  • MrMancunian
    Recognized Expert Contributor
    • Jul 2008
    • 569

    #2
    What type is CommitDateTimeF lag? 'Y' and 'N' are strings, so if CommitDateTimeF lag is a boolean (or bit), you either want to use True and False or 1 and 0.

    Steven

    Comment

    Working...