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