As most people will probably do, I’m connecting to Azure SQL from SQL Server Management Studio on my virtual PC. Suddenly I noticed the last records were not returned when executing a select statement like:
select * from headers order by syncdatetime desc
Strange enough I get the latest datetime when I run the following query:
select max(syncdatetime) from headers
I still don’t know what the cause of the issue is. Got some warning messages on the MEF cache (whatever that may be) and a recommended update of the Visual Studio extensions. The following post suggests the MEF cache might become corrupted when installing Visual Studio extensions. I didn’t install any extensions myself, but I noticed that I enabled the setting to automatically install Visual Studio extension updates. Link: VisualStudio.com
First of all, when I ran the very same query next day all records were returned again. Huh? I also found a work-around via the Azure Portal. You can go to your SQL database in Azure and look for the Data Explorer in the menu.

After logging in to your database, you will get a screen where you can run your queries. Since you are running the query from Azure now, all records will be returned. Just like a logic app calling the database will get back all results.
Very strange indeed. If you have any suggestions, please let me know.