View Single Post
  #2 (permalink)  
Old October 31st, 2003, 09:24 AM
SerranoG SerranoG is offline
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Quote:
quote:Originally posted by fastcorvette
SELECT *, IIF(PricePer > 0, (Cost/PricePer), 0) as MAmt FROM Table WHERE Num = @Num
Perhaps the addition of the IIF statement then makes Access mistakenly misinterpret the slash in (Cost/PricePer). How about being more explicit?
Code:
   SELECT *, IIF([Table].[PricePer] > 0, _
   [Table].[(Cost/PricePer)], 0) As MAmt FROM Table WHERE Num = @Num



Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division