Excellent point, o-sensei merlyn. Error/ value checking will occur at a different place in the script -- no unsafe value should reach this sub. update
for those of you wondering, an apostrophe will stun most SQL parsers. The short answer is something like