android - Comparing two tables in Sqlite using common column -
i'm creating app automatically lists calls , sms of day in order of time. completed codes store both sms , calls database using services. have 2 table:
table call(number, name, call_type, call_duration, date, time, time_in_milliseconds (long)) table sms(number, name, message, date, time, time_in_milliseconds (long))
i need compare both tables based on time_in_milliseconds
, , retrieves entire row , set text view in order of time_in_milliseconds
increases.
if understand correctly can use code:
ourdatabase.rawquery("select number, name, call_type, call_duration, date, time, time_in_milliseconds " + " call " + " union " + " select number, name, message, date, time, time_in_milliseconds " + " sms " + " order time_in_milliseconds", null);
Comments
Post a Comment