Guest User

Untitled

a guest
Oct 18th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. select
  2. Table1.*,
  3. case
  4. when Table1.KSCHL = 'Y'
  5. then Table1.KBETR
  6. else
  7. Table1.KBETR * t2.KBETR
  8. end as Expected
  9. from Table1
  10. left join Table1 as t2
  11. on Table1.matnr = t2.matnr and
  12. Table1.werk = t2.werk and
  13. t2.kschl = 'Y';
Add Comment
Please, Sign In to add comment