   b.effective_start_date
   b.effective_end_date
 from
-  argusmart.rm_case_narrative as a,
-  argusmart.case_version_table as b
+  rm_case_narrative as a,
+  case_version_table as b
 where
   (a.case_id = b.case_id) and
   (a.effective_start_date <= b.effective_start_date) and

  b.effective_start_date,
  b.effective_end_date
from
  argusmart.rm_case_classifications as a,
  argusmart.case_version_table as b
where
  (a.case_id = b.case_id) and
  (a.effective_start_date <= b.effective_start_date) and

  b.effective_end_date
  a.enterprise_id
from
  rm_case_study as a,
  case_version_table as b
where
  (a.case_id = b.case_id) and
  (a.enterprise_id = b.enterprise_id) and
  (a.deleted_flag = convert(0,bigdecimal)) and
  (convert(a.effective_start_date,timestamp) <= b.effective_start_date) and
  (convert(a.effective_end_date,timestamp) > b.effective_start_date)

--------------------

  :lm_case_classification
select * from rm_lm_case_classification

--------------------

  :lm_causality
select * from rm_lm_causality

--------------------

  :lm_countries
select * from rm_lm_countries

--------------------

  :lm_product
select
  enterprise_id
  product_id,
  prod_name
  family_id,
  formulation_id
  manufacturer_id,
  concentration
  conc_unit_id,
  indication_id
  code_dict,
  indication_text
  intl_birth_date,
  model_no
  drug_code,
  prod_generic_name
  ind_llt_code,
  ind_llt
  ind_hlt_code,
  ind_hlt
  ind_hlgt_code,
  ind_hlgt
  ind_soc_code,
  ind_soc
  ind_syn_code,
  ind_code_status
  prod_name_abbrv,
  ind_coded
  ind_reptd
from
  rm_lm_product
where
  deleted is null

--------------------

  :lm_product_family
select
  enterprise_id,
  family_id
  name,
  primary_view,
  product_group_id,
  deleted
  name_j
from
  rm_lm_product_family

--------------------

  :lm_report_type
select * from rm_lm_report_type

--------------------

