Skip to content

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

Parameter Type Description
sOrigFilter String First filter string
sFilter String Second filter string

Syntax

Function SQLStrAppendOr String sOrigFilter String sFilter Returns String

Call Example

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