I am running a SQL query that returns a table of results. ... Here is one way to do it from an article titled ...
stackoverflow.com