Sqlpro9/13/2023 > left join handle as h2 on ch.handle_id = h2.rowid > left join chat_handle_join as ch on c.rowid = ch.chat_id > left join chat as c on m.cache_roomnames = c.room_name /* note: chat.room_name is not unique, this may cause one-to-many join */ > left join handle as h on m.handle_id = h.rowid > /*,datetime(m.date + 978307200, 'unixepoch', 'localtime') as TextDate - date stored as ticks since */ > else coalesce(h2.id, h.id) end as ToPhoneNumber > ,case when m.is_from_me = 0 then m.account > ,case when m.is_from_me = 1 then m.account > ,coalesce(m.cache_roomnames, h.id) ThreadId Or you can do it in Terminal with a few incredibly detailed and finicky / unforgiving-of-even-a-single-typo commands: sqlite3 chat.db You can use different applications - I have used dbHarbour (free, I think). I can then see all my messages (I have squashed up some of the columns to partially hide my content): (h2.service is null or m.service = h2.service) try to eliminate duplicates due to non-unique message.cache_roomnames/chat.room_name Left join handle as h2 on ch.handle_id = h2.rowid Left join chat_handle_join as ch on c.rowid = ch.chat_id Left join chat as c on m.cache_roomnames = c.room_name /* note: chat.room_name is not unique, this may cause one-to-many join */ Left join handle as h on m.handle_id = h.rowid *,datetime(m.date + 978307200, 'unixepoch', 'localtime') as TextDate - date stored as ticks since */ ,case when m.is_from_me = 0 then m.accountĮlse coalesce(h2.id, h.id) end as ToPhoneNumber ,case when m.is_from_me = 1 then m.account ,coalesce(m.cache_roomnames, h.id) ThreadId
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |