I am trying to write a query like this (hopefully with only one Query): Select all messages from inbox table where the "SenderNumber" of the message is found in "Sentitems" table and the CreatorID is 'Martin'
For example my inbox table looks like this:
| SenderNumber | TextMessage |
11111111 Yes, nice world!
22222222 Howdy folks!
And my sentitems table looks very similar
| DestinationNumber | TextMessage | CreatorID
11111111 Hello world? Martin
22222222 How you do? John
I would like to get all message from Inbox table with this condition - there is an entry for this "SenderNumber" / "DestinationNumber" in my sentitems table and the CreatorID is 'Martin'.
So in this case it would return this entry because the creatorID for the other number is not 'Martin' but 'John'
| SenderNumber | TextMessage |
11111111 Yes, nice world!