1

I have an issue here, i am able to delete individual contacts fine, My concern is more regarding deleting specific fields (Mobile Number, WorkNumner) with in a contact. let me give you a example,

Contact Data:

Name : Jhon

email : abc@gmail.com

Work Number : 9999999999

Work Number : 9999999999

Now I just want to delete one instance of it, Not both. I have the contact ID and the number to be deleted.

How to proceed from here ? Please help

sunil
  • 177
  • 2
  • 12

1 Answers1

0

Hint: I suggest you create the contact again without those fields, and delete the previous contact.

ARMAGEDDON
  • 939
  • 3
  • 11
  • 23
  • 1
    Hi William, Thanks butThat whould be lot of work pulling all the data and recreating a contacts just to remove a field.. Any other way ? – sunil Jul 30 '13 at 11:55
  • In the following link you can see more about updating contacts:http://stackoverflow.com/questions/3351545/how-to-update-contact-number-using-android – ARMAGEDDON Jul 30 '13 at 11:59
  • I suggest you see how both Work Numbers are inserted in the table. Is there something like Work1 Work2 columns? or both numbers are being inserted in the same field separated by a delimiter. After checking, you will have to execute an update to either Work2 (if there are 2 columns) or update the field itself containing both work numbers. You will have to get the correct syntax and query for updating fields ( to Delete, update to null if there are 2 columns for Work ) , otherwise, you'll have if both exist in the same field for example 123456,123456 you'll have to update it to 123456. – ARMAGEDDON Jul 30 '13 at 15:07