I am working on an SMS application. I have designed the database so that my application does not get broken when the SMS content provider is removed. I have implemented some triggers to do clean-up work. I created the sms class using this statement:
`CREATE TABLE sms(_id INTEGER PRIMARY KEY AUTOINCREMENT, date_sent INTEGER DEFAULT 0, address TEXT, body TEXT, thread_id INTEGER);`
When the user would receive an SMS, the address of the SMS would contain his number plus country code. For me, it can be +91 9807 xxx xxx.
Suppose my table stores this address as 9807 xxx xxx. In case of triggers, a newly inserted row can be accessed with new
keyword. So, to access the address, I would write new.address
.
The Trigger is programmed in a way that depends on address and trigger only avails address
information as new.address only.
My question is: how can I compare 9807 xxx xxx stored in the database against +91 9807 xxx xxx ?
Please note that I do not have direct access to either 9806 xxx xxx or +91 9807 xxx xxx. I can only reference them using address and new.address respectively.