Thanks for the feedback.
couldn't you just BCP the results out to a file using SQLCMD and open the file in Powershell?
From a PowerShell perspective, I think that character-based (not native-based) BCP output would generate the same type of "text" file as:
sqlcmd.exe -S ... -E -Q "select X, Y from my_table"
I'm thinking BCP and sqlcmd are probably a wash.
By the same token, I'm not sure that PowerShell is the answer here. Why not create a spreadsheet that looks at external data through a pass-through view and plot from that?
I'm trying to remove all Microsoft Office installation aspects from this project. We are a locked down shop which does not allow Office to be installed on its servers, and I would like to be able to graph data while logged onto remote servers that may be accessible only through a VPN. So, the native graphing ability of PowerShell (i.e., Microsoft Chart Controls for the .NET Framework, which is oddly part of our base install) is attractive.
I originally thought that sqlcmd.exe was not returning its results in an object, but I was mistaken.
link for LibraryChart.ps1 that I cited above is the closest I've found for graphing data from the PowerShell command line. However, it relies on the use of a PowerShell hash table to feed its data to the Microsoft Chart Controls. The PowerShell "get-process" command returns SystemArray output that is compatible with LibraryChart.ps1 and its use of a hash table, but sqlcmd.exe returns a SystemArray that does not appear to be compatible with the script. I'm thinking there is a way to pipe the sqlcmd.exe output to make it more similar to the "get-process" output, but I have not found it yet.