Ошибка исключения базы данных при создании запроса на обновление - PullRequest
0 голосов
/ 24 мая 2018

Я пытаюсь создать запрос на обновление в базе данных oracle, но я пробовал все, чтобы решить эту проблему, но у меня все еще возникает следующая проблема:

Исключение базы данных (ОШИБКА: синтаксическая ошибка в или около "="Позиция: 66) произошла при выполнении запроса на обновление раздела.Для получения помощи или комментариев, пожалуйста, перейдите на schelp.ge.com

UPDATE pgsbizdim.ps_mnd_reqeng_sc_projectsummary
    SET (form_doc_id=to_number(:column1, '99999999999'),
    logged_date=to_timestamp(:column2, 'YYYY_MM_DD HH24:MI:SS'),
    last_updated_date=to_timestamp(:column3, 'YYYY_MM_DD HH24:MI:SS'),
    logged_by=:column4,
    last_updated_by=:column5,
    project_id=to_number(:column6, '99999999999'),
    project_name=:column7,
    project_opened_date=to_date(:column8, 'MM/DD/YYYY'),
    unit_serial_numbers=:column9,
    project_Scope=:column10,
    project_funding=:column11,
    project_status=:column12,
    region=:column13,
    funding_account_for_parts_costs=:column14,
    enpp_project=:column15,
    kronos_code=:column16,
    m_and_d_pm=:column17,
    requisition_manager=:column18,
    data_freshness=:column19,
    tg1_end_date_planned=to_date(:column20, 'MM/DD/YYYY'),
    tg2_end_date_planned=to_date(:column21, 'MM/DD/YYYY'),
    tg3_end_date_planned=to_date(:column22, 'MM/DD/YYYY'),
    tg4_end_date_planned=to_date(:column23, 'MM/DD/YYYY'),
    tg1_end_date_actual=to_date(:column24, 'MM/DD/YYYY'),
    tg2_end_date_actual=to_date(:column25, 'MM/DD/YYYY'),
    tg3_end_date_actual=to_date(:column26, 'MM/DD/YYYY'),
    tg4_end_date_actual=to_date(:column27, 'MM/DD/YYYY'),
    last_tollgate_completed=:column28,
    tg1_end_date_estimate=to_date(:column29, 'MM/DD/YYYY'),
    tg2_end_date_estimate=to_date(:column30, 'MM/DD/YYYY'),
    tg3_end_date_estimate=to_date(:column31, 'MM/DD/YYYY'),
    tg4_end_date_estimate=to_date(:column32, 'MM/DD/YYYY'),
    business_region=:column33,
    project_scope_additional_monitoring=:column34,
    status_technical=:column35,
    status_commercial=:column36,
    status_procurement=:column37,
    status_risk_and_issues=:column38,
    funding_business=:column39,
    overall_status=:column40,
    quote_baseline=:column41,
    current_project_cost_estimate=:column42,
    obd_percentage=:column43,
    plan_start_date=to_date(:column44, 'MM/DD/YYYY'),
    actual_start_date=to_date(:column45, 'MM/DD/YYYY'),
    tg0_end_date_planned=to_date(:column46, 'MM/DD/YYYY'),
    tg0_end_date_actual=to_date(:column47, 'MM/DD/YYYY'),
    schedule_days=:column48,
    year_project_closed=:column49,
    project_channel=:column50,
    total_no_of_new_assets_added_to_mul=:column51,
    dcs_engineer=:column52,
    dcs_integration_for_bop_data=:column53,
    cdm_scope=:column54,
    funding_source=:column55,
    micro_m_and_d_start_date=to_date(:column56, 'MM/DD/YYYY'),
    micro_m_and_d_completion_date=to_date(:column57, 'MM/DD/YYYY'),
    power_services_cm_and_u_outage_date_tg3=to_date(:column58, 'MM/DD/YYYY'),
    power_services_cm_and_u_plm_id=:column59,
    total_number_of_units_assisted=:column60,
    power_services_cm_and_u_completion_date_TG4=to_date(:column61, 'MM/DD/YYYY'),
    micro_m_and_d_completion_date_plan=to_date(:column62, 'MM/DD/YYYY'),
    customer_name=:column63,
    date_of_customer_close_out_call=to_date(:column64, 'MM/DD/YYYY'),
    customer_close_out_call_approved_as=:column65,
    p_and_e_internal_reconciliation_complete=to_char(:column66),
    funding_account_for_Labor_costs=:column67,
    is_active_archived_deleted=to_number(:column68, '99999999999'),
    equipment_oem=:column69,
    requisition_project_engineer=:column70,
    osm_commissioning_resource=:column71,
    schedule_dependence_on_outage=:column72,
    date_of_end_of_outage_tg4=to_date(:column73, 'MM/DD/YYYY'),
    first_fire_date=to_date(:column74, 'MM/DD/YYYY'),
    swiss_time_labor_code=:column75
    )
    WHERE requisition_project_engineer =:column70 AND project_id=to_number (:column6, '99999999999') AND m_and_d_pm=:column17

Ответы [ 2 ]

0 голосов
/ 24 мая 2018

Не так уж сложно - просто удалите скобки для всего предложения SET, и он скомпилируется;будет ли это работать, я не знаю.

Нет:

update table
  set (col1 = 1, 
       ...
       coln = n
      )
where ...

Да:

update table
  set col1 = 1, 
      ...
      coln = n
where ...
0 голосов
/ 24 мая 2018

Даже без этой таблицы вы получаете синтаксическую ошибку

SQL> explain plan for
  2  UPDATE pgsbizdim.ps_mnd_reqeng_sc_projectsummary
  3      SET (form_doc_id=to_number(:column1, '99999999999'),
  4      logged_date=to_timestamp(:column2, 'YYYY_MM_DD HH24:MI:SS'),
  5      last_updated_date=to_timestamp(:column3, 'YYYY_MM_DD HH24:MI:SS'),
  6      logged_by=:column4,
  7      last_updated_by=:column5,
  8      project_id=to_number(:column6, '99999999999'),
  9      project_name=:column7,
 10      project_opened_date=to_date(:column8, 'MM/DD/YYYY'),
 11      unit_serial_numbers=:column9,
 12      project_Scope=:column10,
 13      project_funding=:column11,
 14      project_status=:column12,
 15      region=:column13,
 16      funding_account_for_parts_costs=:column14,
 17      enpp_project=:column15,
 18      kronos_code=:column16,
 19      m_and_d_pm=:column17,
 20      requisition_manager=:column18,
 21      data_freshness=:column19,
 22      tg1_end_date_planned=to_date(:column20, 'MM/DD/YYYY'),
 23      tg2_end_date_planned=to_date(:column21, 'MM/DD/YYYY'),
 24      tg3_end_date_planned=to_date(:column22, 'MM/DD/YYYY'),
 25      tg4_end_date_planned=to_date(:column23, 'MM/DD/YYYY'),
 26      tg1_end_date_actual=to_date(:column24, 'MM/DD/YYYY'),
 27      tg2_end_date_actual=to_date(:column25, 'MM/DD/YYYY'),
 28      tg3_end_date_actual=to_date(:column26, 'MM/DD/YYYY'),
 29      tg4_end_date_actual=to_date(:column27, 'MM/DD/YYYY'),
 30      last_tollgate_completed=:column28,
 31      tg1_end_date_estimate=to_date(:column29, 'MM/DD/YYYY'),
 32      tg2_end_date_estimate=to_date(:column30, 'MM/DD/YYYY'),
 33      tg3_end_date_estimate=to_date(:column31, 'MM/DD/YYYY'),
 34      tg4_end_date_estimate=to_date(:column32, 'MM/DD/YYYY'),
 35      business_region=:column33,
 36      project_scope_additional_monitoring=:column34,
 37      status_technical=:column35,
 38      status_commercial=:column36,
 39      status_procurement=:column37,
 40      status_risk_and_issues=:column38,
 41      funding_business=:column39,
 42      overall_status=:column40,
 43      quote_baseline=:column41,
 44      current_project_cost_estimate=:column42,
 45      obd_percentage=:column43,
 46      plan_start_date=to_date(:column44, 'MM/DD/YYYY'),
 47      actual_start_date=to_date(:column45, 'MM/DD/YYYY'),
 48      tg0_end_date_planned=to_date(:column46, 'MM/DD/YYYY'),
 49      tg0_end_date_actual=to_date(:column47, 'MM/DD/YYYY'),
 50      schedule_days=:column48,
 51      year_project_closed=:column49,
 52      project_channel=:column50,
 53      total_no_of_new_assets_added_to_mul=:column51,
 54      dcs_engineer=:column52,
 55      dcs_integration_for_bop_data=:column53,
 56      cdm_scope=:column54,
 57      funding_source=:column55,
 58      micro_m_and_d_start_date=to_date(:column56, 'MM/DD/YYYY'),
 59      micro_m_and_d_completion_date=to_date(:column57, 'MM/DD/YYYY'),
 60      power_services_cm_and_u_outage_date_tg3=to_date(:column58, 'MM/DD/YYYY'),
 61      power_services_cm_and_u_plm_id=:column59,
 62      total_number_of_units_assisted=:column60,
 63      power_services_cm_and_u_completion_date_TG4=to_date(:column61, 'MM/DD/YYYY'),
 64      micro_m_and_d_completion_date_plan=to_date(:column62, 'MM/DD/YYYY'),
 65      customer_name=:column63,
 66      date_of_customer_close_out_call=to_date(:column64, 'MM/DD/YYYY'),
 67      customer_close_out_call_approved_as=:column65,
 68      p_and_e_internal_reconciliation_complete=to_char(:column66),
 69      funding_account_for_Labor_costs=:column67,
 70      is_active_archived_deleted=to_number(:column68, '99999999999'),
 71      equipment_oem=:column69,
 72      requisition_project_engineer=:column70,
 73      osm_commissioning_resource=:column71,
 74      schedule_dependence_on_outage=:column72,
 75      date_of_end_of_outage_tg4=to_date(:column73, 'MM/DD/YYYY'),
 76      first_fire_date=to_date(:column74, 'MM/DD/YYYY'),
 77      swiss_time_labor_code=:column75
 78      )
 79      WHERE requisition_project_engineer =:column70 AND project_id=to_number (:column6, '99999999999') AND m_and_d_pm=:column17;
    SET (form_doc_id=to_number(:column1, '99999999999'),
                    *
ERROR at line 3:
ORA-00907: missing right parenthesis


SQL>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...