The problem I am trying to tackle is to be able to call a procedure and run SQL commands on results (like select). Example.
Procedure