May 2018 Entries

Power BI Presenting JSON data from SQL 2014 Table

SQL 2016 or later and SQL Azure both support JSON function in native SQL. However, people using SQL 2014 or below are out of luck.However, if we just need a quick report, PowerBI can provide that functionality. Here are the steps:New PowerBI file >> Get DataSet up our SQL connection. Because JSON parsing function is not supported natively, this connection cannot be Direct Query. Even if we set it up as such, later steps will force PowerBI to change the connection type to "Import".Do not click ......

Posted On Friday, May 4, 2018 9:54 AM | Comments (0)

SQL Remove Duplicates without Using Temp Table or Modifying Existing Table

Up until now, the way I understood to "fix" a table with duplicate data and no primary key or unique key is either:Modify the existing table, add a column and populate with unique key data, then delete off that unique key, orSELECT DISTINCT * INTO [a temp table] FROM [current table], TRUNCATE FROM [current table], INSERT INTO [current table] SELECT * FROM [a temp table]I am not saying one way is better than the other. In fact, if our table is huge and we are worried about transaction log file usage ......

Posted On Friday, May 4, 2018 9:11 AM | Comments (0)

Copyright © Kevin Shyr

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski