Category: MSSQL

  • IIF and CHOOSE: Logical functions in SQL Server

    IIF IIF is a function available after SQL 2012 version. It returns one of two values depending on a boolean expression. An example: CHOOSE CHOOSE is for getting a value at an index from a list. (unlike arrays, it is not zero-based ) It can be used with column values.

  • Azure SQL Database (MSSQL) -…

    Azure SQL Database (MSSQL) – Working with JSON Data SELECT Modify Convert JSON collections to a rowset Resources & more: https://cloudblogs.microsoft.com/sqlserver/2016/01/05/json-in-sql-server-2016-part-1-of-4/ https://channel9.msdn.com/Shows/Data-Exposed/SQL-Server-2016-and-JSON-Support https://azure.microsoft.com/es-es/blog/json-support-is-generally-available-in-azure-sql-database/ https://docs.microsoft.com/en-us/sql/relational-databases/json/json-data-sql-server?view=sql-server-ver15 https://docs.microsoft.com/en-us/sql/relational-databases/json/store-json-documents-in-sql-tables?view=sql-server-ver15 https://docs.microsoft.com/en-us/sql/relational-databases/json/index-json-data?view=sql-server-ver15 MySQL from version 5.7 has JSON support: https://www.sitepoint.com/use-json-data-fields-mysql-databases/ #azure #azure-database #json #mssql-json

  • Why Brackets in SQL queries with SQL Server

    It’s been long time since I worked with SQL Server last time. I have been working with Oracle and there are differences for sure. This one is simple. The brackets are required if you use keywords or special chars in the column names or identifiers. You could name a column [First Name] (with a space)–but…