Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not being able to add two integer fields in Impromptu

Status
Not open for further replies.

MitraMIS

MIS
Jun 22, 2004
42
0
0
US

Hello group;

I've made a very simple calculation field in my Impromptu report that adds two integer fields.

calculation field = New Qty+Book Qty

Value in New Qty is 1 and value in Book Qty is null.

Being math major, I expect to get 1 for my calculation field, but I get zero.

What am I missing?

Both fields are difined as integer in SQL server.

TIA;

Mitra

 
A Null field is not equal to Zero.

I don't know in SQL , but in Oracle there is a function for null value called NVL([Field Name], Value )
so if [Field name] is null it s replaced by the defined Value
then your calculation would be:
calculation field = New Qty + NVL(Book Qty , 0 )

I m sure that you ll find same function in SQL , if not then use a if then else function.
 
Thanks Draoued for your response.

I couldn't find the equivalent of NVL in SQL, but if then else function worked.

Thanks again;

Mitra
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top