public void TransferStudies() { string sql_string = @"INSERT INTO ad.studies (sd_sid, display_title, title_lang_code, brief_description, data_sharing_statement, study_start_year, study_start_month, study_type_id, study_status_id, study_enrolment, study_gender_elig_id, min_age, min_age_units_id, max_age, max_age_units_id, datetime_of_data_fetch, record_hash, study_full_hash) SELECT s.sd_sid, display_title, title_lang_code, brief_description, data_sharing_statement, study_start_year, study_start_month, study_type_id, study_status_id, study_enrolment, study_gender_elig_id, min_age, min_age_units_id, max_age, max_age_units_id, datetime_of_data_fetch, record_hash, study_full_hash FROM sd.studies s INNER JOIN sd.to_ad_study_recs ts ON s.sd_sid = ts.sd_sid where ts.status = 1"; dbu.ExecuteTransferSQL(sql_string, "studies", "Adding"); }
public void TransferDataObjects() { string sql_string = @"INSERT INTO ad.data_objects(sd_oid, sd_sid, display_title, version, doi, doi_status_id, publication_year, object_class_id, object_type_id, managing_org_id, managing_org, lang_code, access_type_id, access_details, access_details_url, url_last_checked, eosc_category, add_study_contribs, add_study_topics, datetime_of_data_fetch, record_hash, object_full_hash) SELECT s.sd_oid, s.sd_sid, display_title, version, doi, doi_status_id, publication_year, object_class_id, object_type_id, managing_org_id, managing_org, lang_code, access_type_id, access_details, access_details_url, url_last_checked, eosc_category, add_study_contribs, add_study_topics, datetime_of_data_fetch, record_hash, object_full_hash FROM sd.data_objects s INNER JOIN sd.to_ad_object_recs nd ON s.sd_oid = nd.sd_oid WHERE nd.status = 1"; dbu.ExecuteTransferSQL(sql_string, "data_objects", "Adding"); }