Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Why does this code produce error when Field length is 0 Expand / Collapse
Author
Message
Posted Thursday, October 7, 2010 12:33 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, September 6, 2012 2:11 PM
Points: 2, Visits: 55
The code is:

=IIF(Len(Fields!Academic.Value)> 0, Left(Fields!Academic.Value,InStr(Fields!Academic.Value, "(") - 1), "")
which produces and error.
If I change the code to
=IIF(Len(Fields!Academic.Value)> 0, Fields!Academic.Value, "") there is no error. I want to display only the characters before ")" character if the field has a value otherwise nothing. Seems simple enough but ...
any ideas.
Post #1000812
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse