Skip to main content
2 of 2
added 143 characters in body
Prónay
  • 604
  • 4
  • 12

Make phone type value "mobile" for every individual

We need to switch every individual contact's phone type to mobile. I have an SQL query that I could run manually, but for the civicrm_phone_before_update trigger using a function that doesn't get defined when running manual queries.

FUNCTION [db].civicrm_strip_non_numeric does not exist is the error that pops up when I try to run the query.

And I had no luck trying to edit the trigger so it would temporarily associate with a different table. I'd DROP the trigger, but it seems important for day-to-day function, and I'm not confident I'd be able to manually restore it once I've finished transforming over 1,000 records from landline to mobile values. What's the right way to do this?

Addendum ...

The SQL statement triggering the error:

UPDATE civicrm_phoneSETlocation_type_id="3" WHERE phone IS NOT NULL;

Prónay
  • 604
  • 4
  • 12