Skip to content

Instantly share code, notes, and snippets.

@Haruki
Created March 27, 2017 08:44
Show Gist options
  • Save Haruki/a4aff65b760d8b322a168e875c35ce09 to your computer and use it in GitHub Desktop.
Save Haruki/a4aff65b760d8b322a168e875c35ce09 to your computer and use it in GitHub Desktop.
case in sql
select has.id HAS_ID,
htf.id HTF_ID,
htfbew.halmv_id HAS_MSN_ID,
case
when htfbew.bew = 1 and hv.bew_von is not null and hv.bew_bis is not null then
1
else
0
end HTF_BEW,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment