I am trying to get records where an insurance expiry date has expired based on a parameter date or when insurance is required but no data has been entered in the insurance date field.
( {?date_expire} > {CONTRACT.CGL_INS} or
{?date_expire} > {CONTRACT.AUTO_LIA_INS} or
{?date_expire} > {CONTRACT.PERFORM_BOND} or
( ( isnull({CONTRACT.CGL_INS} ) and CONTRACT.CGL_INS_RQD} = 1 ) or
( isnull({CONTRACT.AUTO_LIA_INS} ) and {CONTRACT.AUTO_LIA_INS_RQD} = 1) or
( isnull({CONTRACT.BUILDER_INS} ) and {CONTRACT.BUILDER_INS_RQD} = 1 ) or
( isnull({CONTRACT.LM_BONDING} ) and {CONTRACT.LM_BONDING_RQD} = 1 ) or
( isnull({CONTRACT.PERFORM_BOND} ) and {CONTRACT.PERFORM_BOND_RQD} = 1) ) )
I am not picking up the records where the expiry dates are null but it the rqd = 1. If I comment out the ?expiry dates
then I pick up these records.
Any help would be appreciated.
( {?date_expire} > {CONTRACT.CGL_INS} or
{?date_expire} > {CONTRACT.AUTO_LIA_INS} or
{?date_expire} > {CONTRACT.PERFORM_BOND} or
( ( isnull({CONTRACT.CGL_INS} ) and CONTRACT.CGL_INS_RQD} = 1 ) or
( isnull({CONTRACT.AUTO_LIA_INS} ) and {CONTRACT.AUTO_LIA_INS_RQD} = 1) or
( isnull({CONTRACT.BUILDER_INS} ) and {CONTRACT.BUILDER_INS_RQD} = 1 ) or
( isnull({CONTRACT.LM_BONDING} ) and {CONTRACT.LM_BONDING_RQD} = 1 ) or
( isnull({CONTRACT.PERFORM_BOND} ) and {CONTRACT.PERFORM_BOND_RQD} = 1) ) )
I am not picking up the records where the expiry dates are null but it the rqd = 1. If I comment out the ?expiry dates
then I pick up these records.
Any help would be appreciated.