mardi 8 décembre 2015

A field in sqlite database is phone numbers. Some start with 0 and rest start with +91. i want to replace the number which start with 0 with +91.

I have a field in my sqlite database which are phone numbers. Some start with 0XXXXXXX and others start with +91XXXXXXX. Now i want to replace the phone number which start with 0 with +91. When i use the replace function of sqlite it also replaces any other 0 in the phone number with +91.

For example a number is 0987654321. On using replace function of sqlite the field becomes +91987654321

but if the number is 09876054320 then using replace converts it to +919876+915432+91 which i dont want. I should be able to make the output as +919876054320

Aucun commentaire:

Enregistrer un commentaire