Updated stored procedure
Modified the program to run multiple times per query.
Merge pull request #3 from Vandenn/master

a