Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

SQL Syntax - response (2) by AsherShah

$
0
0

yes, I tired but it won't work because this view can not have the hard coded WHERE clause as this will be passed by user. Based on your syntax view should be like code below but this is not working for my requirement. The left outer join part is returing result from whole table while first sel is returning correct result. Both sides of join are not matching in the view sql like the way they do in query.
 
CreateviewVW2 as

SEL a.col1,

a.col2,

a.col3,

b.col4

from

( sel col1,

col2,

col3

fromtab1

) a

leftouterjoin

(SEL col1,

Col3 ascol4

fromtab1

qualify row_number() over ( orderbycol1) = 1

) b

ona.col1 = b.col1;

 

 


Viewing all articles
Browse latest Browse all 27759

Trending Articles



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