문제

I'm a noob guys, so don't be too harsh.

New to the forum, read around and couldn't fin d an answer. Maybe someone here knows if this works or not.

Building a computed column in the management studio, We'll call it total. When I enter this equation, it works:

Liquor + Beer + Wine + Food + NonAlc

When I enter this equation it fails and returns null:

Liquor + Beer + Wine + Food + NonAlc + NonAlc - Voucher

All fields are identical data types (money). Can't get it to work with mixed arguments. Anyone have any suggestions for me?

Thanks in advance.

도움이 되었습니까?

해결책

Do something like this

ISNULL(Liquor, 0) + ISNULL(Beer, 0) + ISNULL(Wine, 0) + ISNULL(Food, 0) 
      + ISNULL(NonAlc, 0) + ISNULL(NonAlc, 0) - ISNULL(Voucher, 0)

다른 팁

Use this: Concat(Liquor , Beer ,Wine ,food ,NonAlc ,NonAlc - Voucher)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top