开发者

Conditional Display

开发者 https://www.devze.com 2023-02-03 17:44 出处:网络
i have an \"active\" field in the database that has the words \"active\" and \"inactive\" in it how can i do i select, to only show Y and N, depending on the \"act开发者_如何学Goive\"/\"inactive\" wo

i have an "active" field in the database that has the words "active" and "inactive" in it

how can i do i select, to only show Y and N, depending on the "act开发者_如何学Goive"/"inactive" wording in that field?


SELECT....
CASE WHEN Active = 'Active' THEN 'Y' ELSE 'N' END
....
FROM Table
0

精彩评论

暂无评论...
验证码 换一张
取 消