Skip to content
Advertisement

Tag: sql-server-2012

SQL Server range indexing ideas

I need help understanding how to create proper indexing on a table for fast range selects. I have a table with the following columns: Column — Type frameidx — int u — int v — int x — float(53) y — float(53) z — float(53) None of these columns is unique. There are to be approximately 30 million records in

SQL Server: Best way to concatenate multiple columns?

I am trying to concatenate multiple columns in a query in SQL Server 11.00.3393. I tried the new function CONCAT() but it’s not working when I use more than two columns. So I wonder if that’s the best way to solve the problem: I can’t use COLUMN1 + COLUMN2 because of NULL values. EDIT If I try SELECT CONCAT(‘1′,’2′,’3’) AS

Query JSON inside SQL Server 2012 column

I have a column inside my SQL Server 2012 table which contains following Json data. Now I want to use this column data in my query like Is there a way to query JSON data in SQL Server 2012? Answer Honestly, this is a terrible architecture for storing the data, and can result in some serious performance issues. If you

TRY/CATCH block vs SQL checks

Shortly, I am wondering which of the following is the better practice: to encapsulate my code in TRY/CATCH block and display the error message to write own checks and display custom error messages As I have read the TRY/CATCH block is not handling all types of errors. In my situation this is not an issue. I am building dynamic SQL

Sql server – recursive delete

I’m trying to delete user’s data and all it’s related data that is located in different tables. All the tables have Foreign Keys but without cascade delete. I investigated some options: Enable cascade delete on all FK, delete and remove the cascade delete. Delete from bottom UP, loop up for all the leaves delete and repeat this operation till Root.

Advertisement