Answers.Body: <p>What you can try is in line 8 in <a href="https://github.com/civicrm/civicrm-core/blob/7c907de0574a3fd76aacc9264d5fbbef54f33b8f/CRM/Upgrade/Incremental/sql/5.15.alpha1.mysql.tpl#L8" rel="nofollow noreferrer">CRM/Upgrade/Incremental/sql/5.15.alpha1.mysql.tpl</a> you can change it from</p>
  
  <pre><code>SELECT @option_group_id_ps as option_group_id, {localize field='label'}`label`{/localize}, value, ov.name, weight, ov.is_reserved, ov.is_active, is_default
  </code></pre>
  
  <p>to</p>
  
  <pre><code>SELECT @option_group_id_ps as option_group_id, ov.{localize field='label'}`label`{/localize}, ov.value, ov.name, ov.weight, ov.is_reserved, ov.is_active, ov.is_default
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-09T14:00:34.707Z
Answers.Text: Okay, I will check it and inform you. Thank you.
Answers.UserDisplayName: Soukhin Basu
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-09T20:36:35.987Z
Answers.Text: This is worked for me. Thank You!
Answers.UserDisplayName: Soukhin Basu
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-09T20:49:48.303Z
Answers.Text: Great. Glad it worked.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-09T13:44:51.810Z
Answers.LastActivityDate: 2020-06-09T13:44:51.810Z
Answers.UserDisplayName: Demerit
Body: <p>When I am trying to Upgrade the DB to 5.15.alpha1, some SQL error is occurring.
  How can I fix the error as given below:</p>
  
  <blockquote>
    <p>$Fatal Error Details = Array ( [callback] => Array ( [0] =>
    CRM_Core_Error [1] => exceptionHandler ) [code] => -1 [message] => DB
    Error: unknown error [mode] => 16 [debug_info] => INSERT INTO
    <code>civicrm_option_value</code> (<code>option_group_id</code>, <code>label</code>, <code>value</code>, <code>name</code>,
    <code>weight</code>, <code>is_reserved</code>, <code>is_active</code>, <code>is_default</code>) SELECT
    @option_group_id_ps as option_group_id, label, value, ov.name, weight,
    ov.is_reserved, ov.is_active, is_default FROM civicrm_option_value ov
    INNER JOIN civicrm_option_group og ON og.id = ov.option_group_id AND
    og.name = 'contribution_status' [nativecode=1052 * Column 'label' in
    field list is ambiguous] [type] => DB_Error [user_info] => INSERT INTO
    <code>civicrm_option_value</code> (<code>option_group_id</code>, <code>label</code>, <code>value</code>, <code>name</code>,
    <code>weight</code>, <code>is_reserved</code>, <code>is_active</code>, <code>is_default</code>) SELECT
    @option_group_id_ps as option_group_id, label, value, ov.name, weight,
    ov.is_reserved, ov.is_active, is_default FROM civicrm_option_value ov
    INNER JOIN civicrm_option_group og ON og.id = ov.option_group_id AND
    og.name = 'contribution_status' [nativecode=1052 * Column 'label' in
    field list is ambiguous] [to_string] => [db_error: message="DB Error:
    unknown error" code=-1 mode=callback
    callback=CRM_Core_Error::exceptionHandler prefix="" info="INSERT INTO
    <code>civicrm_option_value</code> (<code>option_group_id</code>, <code>label</code>, <code>value</code>, <code>name</code>,
    <code>weight</code>, <code>is_reserved</code>, <code>is_active</code>, <code>is_default</code>) SELECT
    @option_group_id_ps as option_group_id, label, value, ov.name, weight,
    ov.is_reserved, ov.is_active, is_default FROM civicrm_option_value ov
    INNER JOIN civicrm_option_group og ON og.id = ov.option_group_id AND
    og.name = 'contribution_status' [nativecode=1052 ** Column 'label' in
    field list is ambiguous]"] )</p>
  </blockquote>
  
  <p>Please advice.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-09T12:33:01.267Z
Comments.Text: Are you using mysql 8?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-09T13:20:31.043Z
Comments.Text: Not sure which version we are using now! Could you please advice me from where I can check the mysql version? Thank You!
Comments.UserDisplayName: Soukhin Basu
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-09T13:34:15.410Z
Comments.Text: Go to /admin/reports/status and look for database system version.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-09T13:38:18.553Z
Comments.Text: Database system version:   5.5.5-10.0.23-MariaDB-log
Comments.UserDisplayName: Soukhin Basu
Tags: <drupal><upgrade><evaluating-civicrm>
Title: Error Upgrading DB to 5.15.alpha1 on Drupal 7: SQL error
ThreadText: # Error Upgrading DB to 5.15.alpha1 on Drupal 7: SQL error
  
  (Asked by: username_0 on 2020-06-09)
  
  When I am trying to Upgrade the DB to 5.15.alpha1, some SQL error is occurring.
  How can I fix the error as given below:
  
  > $Fatal Error Details = Array ( [callback] => Array ( [0] =>
  > CRM\_Core\_Error [1] => exceptionHandler ) [code] => -1 [message] => DB
  > Error: unknown error [mode] => 16 [debug\_info] => INSERT INTO
  > `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`,
  > `weight`, `is_reserved`, `is_active`, `is_default`) SELECT
  > @option\_group\_id\_ps as option\_group\_id, label, value, ov.name, weight,
  > ov.is\_reserved, ov.is\_active, is\_default FROM civicrm\_option\_value ov
  > INNER JOIN civicrm\_option\_group og ON og.id = ov.option\_group\_id AND
  > og.name = 'contribution\_status' [nativecode=1052 \* Column 'label' in
  > field list is ambiguous] [type] => DB\_Error [user\_info] => INSERT INTO
  > `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`,
  > `weight`, `is_reserved`, `is_active`, `is_default`) SELECT
  > @option\_group\_id\_ps as option\_group\_id, label, value, ov.name, weight,
  > ov.is\_reserved, ov.is\_active, is\_default FROM civicrm\_option\_value ov
  > INNER JOIN civicrm\_option\_group og ON og.id = ov.option\_group\_id AND
  > og.name = 'contribution\_status' [nativecode=1052 \* Column 'label' in
  > field list is ambiguous] [to\_string] => [db\_error: message="DB Error:
  > unknown error" code=-1 mode=callback
  > callback=CRM\_Core\_Error::exceptionHandler prefix="" info="INSERT INTO
  > `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`,
  > `weight`, `is_reserved`, `is_active`, `is_default`) SELECT
  > @option\_group\_id\_ps as option\_group\_id, label, value, ov.name, weight,
  > ov.is\_reserved, ov.is\_active, is\_default FROM civicrm\_option\_value ov
  > INNER JOIN civicrm\_option\_group og ON og.id = ov.option\_group\_id AND
  > og.name = 'contribution\_status' [nativecode=1052 \*\* Column 'label' in
  > field list is ambiguous]"] )
  
  Please advice.
  
  **Tags:** drupal, upgrade, evaluating-civicrm
  
  > **Comments:**
  > **username_1**: Are you using mysql 8?  
  > **username_0**: Not sure which version we are using now! Could you please advice me from where I can check the mysql version? Thank You!  
  > **username_1**: Go to /admin/reports/status and look for database system version.  
  > **username_0**: Database system version:   5.5.5-10.0.23-MariaDB-log  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-06-09. Score: 1 | Accepted answer
  
  What you can try is in line 8 in CRM/Upgrade/Incremental/sql/5.15.alpha1.mysql.tpl you can change it from
  SELECT @option_group_id_ps as option_group_id, {localize field='label'}`label`{/localize}, value, ov.name, weight, ov.is_reserved, ov.is_active, is_default
  
  to
  SELECT @option_group_id_ps as option_group_id, ov.{localize field='label'}`label`{/localize}, ov.value, ov.name, ov.weight, ov.is_reserved, ov.is_active, ov.is_default
  
  > **Comments:**
  > **username_0**: Okay, I will check it and inform you. Thank you.  
  > **username_0**: This is worked for me. Thank You!  
  > **username_1**: Great. Glad it worked.  
  
  ---
  
  