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

Dynamic cursor with like cmd - forum topic by kganesan

$
0
0

SELECT a.cas_pkeyb.amt
FROM vt_notdisp_ship_to a,
scref_bvws.b_curr_trans b
WHERE (a.ship_to_addr <>'''' AND a.ship_to_addr LIKE ('%b.ship_to_addr%'))
OR (a.ship_to_code <> '''' AND a.ship_to_code LIKE ('%b.ship_to_code%'))
QUALIFY ROW_NUMBER() OVER (ORDER BY a.amount DESC) <=10;
 
I am having a query like above, but i couldnt able to get the result, as after the like cmd, i am having a column from b table, if it a local or input variable, the above will execute correctly.
 
Can you please guide me how to use like on column in dynamic cursor.
 
Thanks,
Ganesh

Forums: 

Viewing all articles
Browse latest Browse all 27759

Trending Articles



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