T-SQL: Quickly Clone a Table

Posted by & filed under Code Snippets, Programming.

To quickly and easily clone a table using T-SQL, the following is useful:

This will create the destination table and copy all source columns and data into it.

Excel: Joining worksheet columns with vlookup()

Posted by & filed under Code Snippets, Programming.

Excel fun time! Today I had a rather large worksheet that had a column with a unique identifier. I had another worksheet with a matching column of UID’s and a second column that I wanted to “join” to the first worksheet. vlookup() is the function for the job.

  • ┬áParameter 1 is the column on the first workbook that contains the UID to match to the UID in the second worksheet. The UID for the second (source) worksheet has to be in the first column. The $ freezes the column reference and is needed.
  • Parameter 2 is a Named range from the second workbook. Highlight the UID and the column you want to merge and name the range.
  • Parameter 3 is the column position in the second workbook that should be merged in based on the UID match.
  • Parameter 4 dictates whether exact matches or similar matches should be applied.

That’s it. Drag the formula down the column to finish the join.

AutoHotkey — Toggling window transparency

Posted by & filed under Code Snippets, Software.

Everyone loves eyecandy! I was missing my transparent console windows, and found a nice way to have them again in Windows 7. It’s as simple as installing AutoHotkey and adding the below script. Let me explain…

Autohotkey has a method called WinSet that allows the manipulation of various GUI related settings. One of them being… you guessed it… transparency. Linki: www.autohotkey.com/docs/commands/WinSet….

An here is the AHK script. Once the script is added and reloaded, it is triggered with Alt+Shift+T.