create or replace view TEST.V_P2_REFO_RNUM as select REFO.* ,row_number() over( partition by SUBMT_ORGANISATION_CODE ,REFERRAL_KEY order by SUBMT_ORGANISATION_CODE ,REFERRAL_KEY , REFERRAL_TRANS_TS) as RNUM from NPF.REFERRAL_OPS REFO@
create or replace view TEST.V_P2_REFO_RNUM as select REFO.* ,row_number() over( partition by SUBMT_ORGANISATION_CODE ,REFERRAL_KEY order by SUBMT_ORGANISATION_CODE ,REFERRAL_KEY , REFERRAL_TRANS_TS) as RNUM from NPF.REFERRAL_OPS REFO@