I noted a missing quote after submitting.
set @sql='Create Table ' + @tablname + '(col1 datatype, col2 datatype, ...)'
Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.