September 4, 2013 at 6:19 am
dwain.c (9/3/2013)
Jeff Moden (9/3/2013)
venoym (9/3/2013)
In order to bridge the gap between Mr. Hugo's excellent comments and other comments about multiple columns, I've seen systems that used a type specific column in their normalized settings table to handle for strongly typing the parameters (or settings). That way a 2 is typed as Int (or BigInt, etc) and not as a string to be inlined into a dynamic query setting.I'd use SQL_Variant for such a thing. It's still "loosly" typed based on whatever data you put in but it will be treated as whatever type you put in. You can even interogate the SQL_Variant column with the SQL_VARIANT_PROPERTY(SomeSQLVariantColumnOrVariable,'BaseType') function.
Interesting that you should suggest that Jeff. As I was reading through Hugo's response, I was thinking along the same lines, showing that a Padawan Apprentice eventually learns to think like his Master.
Thanks, Dwain. It just seemed logical especially since SQL hasn't had the 8,060 barrier for a very long time.
Nice article, by the way. You've gotten a good discussion going. Well done.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing post 16 (of 15 total)
You must be logged in to reply to this topic. Login to reply