locked
How to get value depend on another column RRS feed

  • 質問

  • I have a SQL

    select category, name, class, s_dt, f_dt from catgory

    the class has three values:1, 2, 3

    I hope the the s_dt and f_dt will be null even there is value in DB when calss =1

    Then I hope s_dt and f_dt will be isnull(c.s_dt,'2000/01/01') s_dt, isnull(c.f_dt,'2078/12/31') f_dtwhen class = 2 or 3

    How can I modify my SQL?

    2010年5月21日 2:54

回答

  • Hello mikezang,

    Thank you for posting your question to our forum. However, unfortunately, I’m afraid it might be difficult for you to get a reply since people usually use Japanese here... I’d like to suggest you post your question in an English forum. Please click here to find an appropriate forum (category) depending on the type of your question. I hope you find some useful information! Thank you.

    _______________________________
    Harumi Yamamoto - Moderator (MSKK)

    • 回答としてマーク 山本春海 2010年5月21日 6:18
    2010年5月21日 6:17