dbTalk Databases Forums  

testing for 0 not working correctly

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss testing for 0 not working correctly in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
christy
 
Posts: n/a

Default testing for 0 not working correctly - 06-03-2004 , 12:56 PM






I am having problems testing for zero values

iif([Measures].[Cost]=0,0,1

If the cost is null (empty), then the "0" shows up. If the cost is $0.00, then the "1" shows up, which is wrong

Cost is a measure that comes from the datbase directly. It is defined in SQL server as "decimal" with "20" precision and a scale of "2". It has a Data Type of "Double" and format of "Currency" in OLAP

Any thoughts



Reply With Quote
  #2  
Old   
Joerg
 
Posts: n/a

Default RE: testing for 0 not working correctly - 06-04-2004 , 02:56 AM






Hello
tr
iif(clng([Measures].[Cost])=0,0,1

HT
Jör


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.