Use SQL Output In Where Clause of Another SQL Call

I have two separate SQL databases that I am hitting. I need to query database1 for a the latest timestamp. Then use that to query database2 to get everything after that. These are completely separate SQL servers, so I can’t use custom SQL to hit them in 1 call.

How do I use the output of 1 call for the input of another? I tried using Iterate to take the table result and push it as a parameter to another module, but that never seemed to work.

The “Iterate” action is the correct way of passing the result of one query to another. What didn’t work with it?

I have an iterate to push the 2 items to the next module as parameters. They never show up in the next module as a parameters. Here is what I have.

Your setup seems correct.

See this answer here: Pass a parameter to other module