سؤال

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