Support Questions

Find answers, ask questions, and share your expertise

Converting SAS SQL to Hive QL

avatar
New Contributor
 

I have to convert SAS SQL to hive sql Please help. Below is the SAS code.

proc sql;

create table master as select acct_nbr , clnt_nbr, card_typ from myquery.int_card

order by 1,2 ;

quit;

proc sql;

create table clnt_base as select clnt_nbr , (case when clnt_nbr in (select clnt_nbr from master where crd_type in ('198',199')) then 1 else 0 end) as ultima order by 1;

quit;

 

Please help!!

1 REPLY 1

avatar
Expert Contributor

Hi @Anyy ,

 

What is the from table in the second query? 1st query can work as is.

 

Thanks,

Megh