You can translate the question and the replies:

Join is not recognizing the same data (type text) in the fields and returning null values

I have 2 views. Each of this view has a field **unit** with the type text. I want to join these 2 views over this unit field. When I tried to do it though, I realized that somehow Denodo doesn't find matching values. So it returns an empty view. The type of each field is the same - text. If I just apply WHERE condition in either of the view like WHERE unit = 'L020' it works. It is capable of finding he values in either view. But when I tried to execute this in VQL shell I also got no results: select * from **view1** where **view1**.unit in (select unit from **view2**) Do you have any idea how this can be solved?
21-11-2022 07:29:10 -0500

1 Answer

Hello, In Denodo, the types of join operations supported are Inner Join, Full Outer Join, Left Outer Join, Right Outer Join, Natural Join and Cross Join. You can refer to the document [Join Operations]( to know about all the join types Based on your question, we recommend using the Inner Join in which only the rows satisfying the join condition are obtained in the results. It can be implemented by following the below steps : 1. In VDP Admin Tool/Web Design Studio, go to **File > New > Join** and a *new_view* window will open with tabs Model, Join conditions, Where Conditions, Group By, Output and Metadata. Drag both the views under the ***Model tab***, and connect the columns that constitute the join condition. 1. In the ***Join Conditions ***tab, you will see that by default Inner Join is applied. You can click on it and see the option to change the Join Type, Join method and Join Order. You can refer to the document [Creating Join Views]( for more details on all of these options. The same can be implemented by executing the VQL statement of following syntax : ``` Select <view_name>.<column_name>... from <view1_name> Inner Join <view2_name> where <view1_name>.<join_condition_column_name>=<view2_name>.<join_condition_column_name> ``` Hope this helps!
Denodo Team
23-11-2022 14:05:13 -0500
You must sign in to add an answer. If you do not have an account, you can register here