sql - msg 175, The isnull function requires 2 arguments(s) -


after looking @ similar issues i'm no wiser. have value returning has 2 sets of numbers name i.e. (xxxx;xxxx;name). i'm trying return name. original code i've written (below) works if name value/name present.

select     substring(field_value,75, len (field_value))      [rwadmin].[rv_activity_fields] p join      [rwadmin].[rw_association] on p.activity_id = a.activitya_id  

however breaks report if value blank returns "null",

so i've thought work, above error.

select     isnull(substring(field_value,75, len (field_value)))      [rwadmin].[rv_activity_fields] p join      [rwadmin].[rw_association] on p.activity_id = a.activitya_id 

help please.

isnull takes expression , value replace null values. check expression value, if null returns value provided nulls , if not returns expression value, if want return blank when null should use way:

isnull(substring(field_value,75, len (field_value)), '') 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -