Skip to main content
Inspiring
Apr 8, 2023 8:05 PM UTC
Question

Fetching data from DB using query Entity by comparing different columns of same table

Hi All,

Here is my query.

I have DB TABLE with column A, column B, column C. 

Please help me to convert below SQL query in to Appian Query Entity.

Select * from TABLE where column A = column B;

DSE Constant : cons!TEST_DSE_TABLE

CDT fields are : columnsA,columnB,columnsC

Thanks in Advance.

    3 replies

    stefanhelzle0001
    Brainy
    Apr 9, 2023 7:27 AM UTC

    Appian does not directly support this kind of queries. Either create a view in DB or use synchronized records and a custom record field that stores the result of this comparison.

    mallepup3914
    Inspiring
    Apr 11, 2023 9:06 AM UTC

    In the query entity function, you can use logical expressions and filters in query parameter. Please do refer this link: a!queryEntity() Function - Appian 23.1

    stefanhelzle0001
    Brainy
    Apr 11, 2023 9:23 AM UTC

    But you cannot compare two fields in DB to each other. This is what the TO was asking for.