The following script will create a SELECT statement for the table supplied as a parameter.
** Be sure to get the 'prerequisite' scripts as well