Skip to main content
April 8, 2023
Question

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

  • April 8, 2023
  • 3 replies
  • 0 views

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
    April 9, 2023

    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
    April 11, 2023

    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
    April 11, 2023

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