Quantcast
Channel: SCN : All Content - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 4013

How to write lookup for this Sql Statements

$
0
0

Hi,

 

How to write lookup for the two fields  acct_type  and cust_type


case when (select d.tbl_seg_key from proddb2.lkuptbl d where d.tbl_name = 'TOPNATND' and substr(tbl_seg_key, 5,10) = a.cust_acct_no FETCH FIRST 1 ROWS ONLY ) is not null then 'National'

     when (select d.tbl_seg_key from proddb2.lkuptbl d where d.tbl_name = 'TOPNATN' and substr(tbl_seg_key, 5,10) = a.cust_acct_no FETCH FIRST 1 ROWS ONLY ) is not null then 'National'

      else ' '  end as acct_type,

case when (select d.tbl_seg_key from proddb2.lkuptbl d where d.tbl_name = 'TOPNATND' and substr(tbl_seg_key, 5,10) = a.cust_acct_no FETCH FIRST 1 ROWS ONLY ) is not null then 'Direct'

     else 'Non-Direct' end as cust_type,



Please suggest me any idea how to implement lookup for these in BODS.




Thanks,

Ramnath




Viewing all articles
Browse latest Browse all 4013

Trending Articles



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