--
-- Type: VIEW; Owner: BIOMART; Name: CTD_PRIOR_MED_USE_VIEW
--
  CREATE OR REPLACE FORCE VIEW "BIOMART"."CTD_PRIOR_MED_USE_VIEW" ("ID", "REF_ARTICLE_PROTOCOL_ID", "PRIOR_MED_DRUG_NAME", "PRIOR_MED_PCT", "PRIOR_MED_VALUE") AS 
  select rownum as ID, v."REF_ARTICLE_PROTOCOL_ID",v."PRIOR_MED_DRUG_NAME",v."PRIOR_MED_PCT",v."PRIOR_MED_VALUE"
from 
(
select distinct REF_ARTICLE_PROTOCOL_ID,
			PRIOR_MED_DRUG_NAME,
			PRIOR_MED_PCT,
			PRIOR_MED_VALUE
from ctd_full
where PRIOR_MED_DRUG_NAME is not null
order by REF_ARTICLE_PROTOCOL_ID, PRIOR_MED_DRUG_NAME
) v
 
 
 
 
 
;
 
