Untitled

 avatar
user_5515722
plain_text
11 days ago
1.8 kB
1
Indexable
Never
sb.append(" SELECT                               ");                
        sb.append("     SA.SA_ID,                        ");                
        sb.append("     SA.END_DT,                       ");                
        sb.append("     (SELECT                          ");                
        sb.append("          SP.PREM_ID                  ");                
        sb.append("      FROM                            ");                
        sb.append("          CI_SA_SP SASP,              ");                
        sb.append("          CI_SP SP                    ");                
        sb.append("      WHERE                           ");                
        sb.append("          SASP.SA_ID = SA.SA_ID       ");                
        sb.append("      AND SP.SP_ID = SASP.SP_ID       ");                
        sb.append("      AND SP.SP_STATUS_FLG = 'R'      ");                
        sb.append("      AND ROWNUM = 1                  ");                
        sb.append("     ) PREM_ID,                       ");                
        sb.append("     SC.CHAR_VAL                      ");                
        sb.append(" FROM                                 ");                
        sb.append("     CI_SA SA,                        ");                
        sb.append("     CI_SA_CHAR SC                    ");                
        sb.append(" WHERE                                ");                
        sb.append("     SA.ACCT_ID = :account            ");                
        sb.append(" AND SA.SA_STATUS_FLG <= :closed      ");                
        sb.append(" AND SC.SA_ID = SA.SA_ID              ");                
        sb.append(" AND SC.CHAR_TYPE_CD = :rateCharType  ");
Leave a Comment