Sunday, January 1, 2017

Update to runSQLCommand Project

Octocat
I've added a new feature to the runSQLCommand project-- You now have the option to output to a to the Powershell gridview (out-gridview) control. This control lets you filter, sort, and re-organize the data.  When you start up the script it still defaults to output to the console, but you can switch it to pop up the grid control by typing 'ouput grid'.

The grid control does have some limitations based on the version of Powershell you are running, in Powershell Version 3 it was about 600 rows and 30 columns. I suggest that you test it out on your system to see what it gives you.  Another quirk is that it puts thousand separators in numbers. To avoid this you can format the output with the str command in sql.

Example:
Select str(account_no), name from accounts 


More info about this project can be found at https://jeffspillerconsulting.github.io/RunSQLCommand/

You can download the script from Github at
  https://github.com/JeffSpillerConsulting/RunSQLCommand/blob/master/runSQLcmd.ps1

Please let me know what you think

Happy querying!

No comments:

Post a Comment