SQLStrAppendOr - DataDictionary

Helper function that will take two SQL filter strings and combine them using proper SQL OR syntax

Type: Function

Return Data Type: String

Parameters: String sOrigFilter String sFilter

ParameterDescription
sOrigFilterFirst filter string
sFilterSecond filter string


Return Value


Syntax
Function SQLStrAppendOr String sOrigFilter String sFilter Returns String

Call: Get SQLStrAppendOr sOrigFilter sFilter to StringVariable


Description

This is a helper function that will take two SQL filter strings and combine them (i.e. combine them using proper SQL OR syntax).

If either filter string is empty, the function will handle this properly and just return the non-blank value. This means you don't need to test if a string is empty before calling this.

Sample

This sample shows how to create and apply two SQL filters that have been combined using OR.

Object oCustomerDataDictionary is a cCustomerDataDictionary
    Set pbUseDDSQLFilters to True
    
    Procedure OnConstrain
        String sFilter

        Get SQLStrAppendOr 'Customer.Customer_Number < 20' 'Customer.Customer_Number > 50' to sFilter
        Set psSQLFilter to sFilter
    End_Procedure
    
End_Object