Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 3rd, 2006, 11:25 PM
Vishnu Kumar Tiwari
Guest
 
Posts: n/a
Default Need help for msdata expression = "IIF

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
  #2  
Old August 4th, 2006, 03:35 AM
Kevin Yu [MSFT]
Guest
 
Posts: n/a
Default RE: Need help for msdata expression = "IIF

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.)

 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles