Differences Between In and Contain Operators

  • Last update: May 13, 2025
  • Overview

    Condition Judgment Logic Description has briefly introduced four types of condition judgment logic, which are InNot InContain, and Not Contain. If you are unclear about the differences between In and Contain, as well as Not In and Not Contain, read this document for a detailed explanation.

    Detailed Description

    Description of Contain and In

    Contain: whether one set includes all elements of another set. If A contains B, all elements of B are in A, representing a relationship between a part and the whole. Example:

    • "This is a test text" contains "a test", but does not contain "text test", and does not contain "a text".

    • If Set A = {1, 2, 3, 4} and Set B = {2, 3}, A contains B.

    In: whether an element is in a set.If the element A is in Set B, A is a member of B, emphasizing the relationship between an element and a set. Example:

    • If Set A = {1, 2, 3, 4}, the element "3" is in Set A.

    • The element "test text" is in the set {test text, test text 1, example}, but is not in the set {test, text}, and is not in the set {test text experiment}.

    The details of the sample data are shown in the following figure.

    2.1-1.png

    Scenario
    Contain
    In
    Only filter data where Ship City is Nanjing.

    Condition to be set: Ship City Contain Nanjing

    If the condition is set as:

    • Ship City Contain Nanjin,Nan jing. The result is empty.

    • Ship City Contain Nan. The result will display data where Ship City is Nanjing and Nanchang.

    Condition to be set: Ship City In Nanjing.

    If the condition is set as:

    • Ship City In Nanjing area. The result is empty.

    • Ship City In Nan,jing. The result is empty.

    Only filter data where Ship City is Nanjing or Beijing.

    Condition to be set:

    2.1-2.png

    If the condition is set as: Ship City Contain Nanjing,Beijing. The returned result is empty.

    If A contains B, B can only be a single text value rather than multiple ones.

    The condition to be set: Ship City In Nanjing,Beijing.

    If A is in B, B can include multiple text values.

    Filter data where Ship City has no restrictions.

    The condition to be set: Ship City Contain empty value. The returned result is all data (Data with null values are included in the result, while data with empty values are not included in the result.)

    2.1-3.png

    The condition to be set: Ship City In empty value. The returned result: all data (including data with null values and empty values).

    2.1-4.png

    Description of Not Contain and Not In

    Not Contain: If A does not contain B, some elements of Set B are not in Set A.For example:

    • If Set A = {1, 2, 3, 4} and Set B = {2, 5}, A does not contain B.

    • "This is a test text" does not contain "test-text", "tes tex", nor "a text".

    Not In: If A is not in B, element A is not in Set B.For example:

    • If Set A = {1, 2, 3, 4}, the element "5" is not in Set A.

    • The element "test text" is not in the set {test, text} nor the set {test text experiment}.

    The details of the sample data are shown in the following figure.

    2.2-1.png

    ScenarioNot ContainNot In
    Filter data where Ship City does not have the value Nanjing.

    The condition to be set: Ship City Not Contain Nanjing. The returned result displays data where Ship City does not have the value Nanjing. (Data with null values in Ship City are included in the filtering result, while data with empty values are not included.)

    2.2-2.png

    The condition to be set: Ship City Not In Nanjing. The returned result displays data where Ship City does not have the value Nanjing. (Data with empty values or null values in Ship City are also included in the filtering result.)
    Filter data where Ship City does not have the values Nanjing and Beijing.

    The condition to be set:

    2.2-3.png

    The result returns data where Ship City does not have the values Nanjing and Beijing. (Data with null values in Ship City are included in the filtering result, while data with empty values are not included.)

    The condition to be set: Ship City Not Contain Nanjing,Beijing. The returned result displays all data except data where Ship City is empty.

    The condition to be set: Ship City Not In Nanjing,Beijing. The returned result displays data where Ship City is not Nanjing or Beijing. (Data with empty or null values in Ship City are also included in the filtering results.)
    Filter data where Ship City has no restrictions.

    The condition to be set: Ship City Not Contain empty value. The returned result is empty

    2.2-4.png.

    The condition to be set: Ship City Not In empty value. The returned result is empty.

    2.2-5.png


    附件列表


    主题: Data Development - Scheduled Task
    Previous
    Next
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy