0 Replies Latest reply: Apr 28, 2017 7:31 AM by Priya R RSS

    Sql to qv

    Priya R

      Hi Community,

       

      can someone pls share your thoughts on below query to convert form sql to qv

       

       

      from T_CDR
      LEFT JOIN

      (SELECT ftp_aln_002, local_gl_key_009, gross_gl_bal_rptg_ccy_013 from HNAH_STG_GL_PROD_DETAILS
      where (ftp_aln_002, gl_account_016) IN (
      SELECT ftp_aln_002, gl_account_016 from HNAH_STG_GL_PROD_DETAILS
      where Balance_Type_015 IN ('EOPBL','OLNBL')
      and ftp_aln_002 IN (
      SELECT ftp_aln_002 from HNAH_STG_GL_PROD_DETAILS
      where Balance_Type_015 IN ('EOPBL','OLNBL')
      group by ftp_aln_002
      having sum(gross_gl_bal_rptg_ccy_013) <> 0)
      group by ftp_aln_002, gl_account_016
      having sum(gross_gl_bal_rptg_ccy_013) <> 0))

      on ftp_aln_002 = exposure_attribute_2

      where (ftp_aln_002 IS NOT NULL OR TABLE_NAME IN ('LOANDEPO','ON_OFF_BALANCE','BOND','TRANCHE')) and outstanding <> 0 and (customer_field18 is NULL OR substr(collateral_attribute_5,1,1) = ' ')
      and interco IN ('N','G')
      and (flag_adjustment IS NULL or flag_adjustment IN ('R','T'))