#12 Fixes numeric and named param formats in SQL

Includes new tests to catch the issue, thanks to @chebizzarro for
spotting.