You get an error because you didn't substitute "<email address>" with a literal string as you originally intended. (You should get the same error if you run your original search with the angled brackets.) Meanwhile, the original question is rather ambiguous. If the qid values from the table command are the matching qid from the subsearch, the results from sourcetype=INDEX_B index=INDEX_B
[search sourcetype=INDEX_A to=*<email address>* | fields msgid |rename msgid as hdr_mid]] already contain everything matching these qid's. What else is expected? (I take that the statement "I have to rename msgid to hdr_mid as thats the name of the field in INDEX_A" should read as "I have to rename msgid to hdr_mid as thats the name of a matching field in INDEX_B.")
... View more