Like many developers, I spend quite a bit of my day RDP’ed into some virtual server or other. Even with dual monitors, it can become annoying to flip between sessions. So then I got a tip about this very nifty utility, and now I couldn’t get along without it. Made by visionapp, it’s called vRD. They have a free version, and one that’s $69.00, or slightly more if you want upgrade maintenance & support. I use the freebie. You can store your credentials if you want to, categorize your server list in a nice treeview, and the app...
Use the very nifty SQL_VARIANT_PROPERTY to determine the data type of a returned column. Admittedly, it’s faster to look at the table definition in SSMS. But this is pretty neat.
DECLARE @TableVar TABLE (MyColumn numeric(18,5))
INSERT INTO @TableVar VALUES (5.5)
SELECT TOP 1
MyColumn,
SQL_VARIANT_PROPERTY(MyColumn, 'BaseType') AS 'Base_Type',
SQL_VARIANT_PROPERTY(MyColumn, 'Precision') AS 'Precision',
SQL_VARIANT_PROPERTY(MyColumn, 'Scale') AS 'Scale'
FROM @TableVar