Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: WHERE statement doesn't work

$
0
0

Hi Dimitri,

I recreated your scenario in my HANA system , but could not reproduce the issue that you saw.

 

While running the query with the data that you provided . I got the below results which is expected.

 

select * from ( 

    select t.id as id, t2.id as id2  

    from TE113926.test_table_view t 

    join test_table2_view t2     

    on t.value = t2.value 

 

9-4-2013 10-50-19 AM.jpg

And running the query after the where clause , I got the below result which I think is the expected result. So I might be missing your issue all together.

 

select * from ( 

    select t.id as id, t2.id as id2  

    from test_table_view t 

    join test_table2_view t2     

    on t.value = t2.value 

where id2 is not null  

      and id2 = 1; 

 

9-4-2013 10-53-18 AM.jpg

 

Also please remember as the views do not store the data and ID field in the view is a run time data the data values might change based on the run time values for the table.

 

Cheers!!

Durga


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>