Fetching results on the basis of column combination

Certified Associate Developer

Hello All,

I have a requirement to fetch values from two different views created in mssql to get the final result. The problem here is I don't have unique column in both the table, Hence I have to use column combinations to get the desired value. Here is the scenario

Suppose Table1 has 4 columns, Namely

col1   col2  col3   col4

Table2 also has 4 columns,Namely

col1   col2   col3   col4

 

Now I have to fetch the result on the basis of columns combination, Lets say If value in col1 and col2 of table1 is exactly same as the value of col1 and col2 in table two only then I have to retrieve the result. Can someone please let me know if there is a way to do this? I can not create view to merge this, So that option is not available for me.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    This is something I would strongly recommend building in a view and NOT in Appian. Off the top of my head you have two options - use the Query Database node and write your SQL statement in the node configuration or load the tables into local variables and do a comparison inside of an expresison. Again, neither of these workarounds are optimal since your requirement should be fulfilled by building a database view.
Reply
  • 0
    Certified Lead Developer
    This is something I would strongly recommend building in a view and NOT in Appian. Off the top of my head you have two options - use the Query Database node and write your SQL statement in the node configuration or load the tables into local variables and do a comparison inside of an expresison. Again, neither of these workarounds are optimal since your requirement should be fulfilled by building a database view.
Children
No Data