Be very careful of this approach as poorly formed SQL can accidentally generate very large numbers of messages.