<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Fetching results on the basis of column combination</title><link>https://community.appian.com/discussions/f/data/12104/fetching-results-on-the-basis-of-column-combination</link><description>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&amp;#39;t have unique column in both the table, Hence I have to use column combinations to get the desired value. Here</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Fetching results on the basis of column combination</title><link>https://community.appian.com/thread/53644?ContentTypeID=1</link><pubDate>Sun, 25 Mar 2018 23:11:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0be1c85c-c7d7-417a-ba9f-7212f63a11d0</guid><dc:creator>Abhay Giri</dc:creator><description>HI Vivek,&lt;br /&gt;
&lt;br /&gt;
You can create view, instead of comparing both columns individually from table 1 to table 2 , concatenate column 1 &amp;amp; 2 and make it one column for the both table 1 &amp;amp; 2. Now you will have one common column in each table . I think you can easily now compare both table and get the result. Here is the code for your reference :&lt;br /&gt;
&lt;br /&gt;
select   tb1.*, tb2.*  from Table 1 as tb1 join Table 2 as tb2 on concat(tb1.column1,tb1.column2)=concat(tb2.column1,tb2.column2).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Regards&lt;br /&gt;
Abhay Giri&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fetching results on the basis of column combination</title><link>https://community.appian.com/thread/53623?ContentTypeID=1</link><pubDate>Fri, 23 Mar 2018 15:51:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:039d94a7-d6df-48f0-a83f-a211f44fe582</guid><dc:creator>Josh</dc:creator><description>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.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>