HighTechTalks DotNet Forums  

Need help for msdata expression = "IIF

Dotnet XML microsoft.public.dotnet.xml


Discuss Need help for msdata expression = "IIF in the Dotnet XML forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Vishnu Kumar Tiwari
 
Posts: n/a

Default Need help for msdata expression = "IIF - 08-03-2006 , 05:29 PM






I am using below expression in xsd...
I am getting devide by zero error.

For ur information I am filling the dataset with the results obtained from
Stored procedure.
Now again I need to calculate one field which is the divison of two fields
returned from SP.
Please notice that the third field is not available in the database. We need
to calculate inside xsd using the two fields returned from SP.
Please help

<xs:element name="CALC_BLDG_SBMT_PER_SQFT_AMT" type="xs:decimal"
msdata:Expression="IIF((IsNULL(TOTFLRAREASQFTNBR, 0) > 0),
(IsNULL(BLDG_VAL_AMT, 0) / TOTFLRAREASQFTNBR ),NULL)" minOccurs="0" />
--
Vishnu

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

Default RE: Need help for msdata expression = "IIF - 08-03-2006 , 09:40 PM






Hi Vishnu,

I tried the expression on my machine. However, I tried divisor and dividend
columns with NULL and 0 values, none of the cases gives devide by 0
exception. Could you check which value in the returned rows gives this
error? Also, are there any other calculated rows in the table?

Kevin Yu
Microsoft Online Community Support
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
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.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.