Data SenseiforSihan's Code Repocode-repo.hashnode.dev·Feb 20, 2024Nested IF in TSQL--nesting example DECLARE @Var1 INT = 15 IF @Var1 % 5 = 0 BEGIN IF @Var1 % 3 = 0 BEGIN print 'the number is divisible by 3 and 5' END ELSE BEGIN print 'the number is divisible by 5' END END ELSE BEGIN IF @Var1 %...DiscussSQL
Sadat Arefin Rafatdevrafat.hashnode.dev·Dec 18, 2023Detailed overview of Query Hints in T-SQLI needed to learn SQL Server Query Hints as part of my work. So I wrote a documentation outlining the query hints with examples. First I put summary. Then the detailed discussion. I took help from BARD in some cases, especially to summarize the descr...Discuss·45 readsSQL Hints
Josef Richbergjosefrichberg.com·Sep 6, 2023How to curb aggressive parallelism in Microsoft SQL ServerMicrosoft SQL Server, like most modern database systems, can convert a query into a set of parallel instructions to improve efficiency. This is map-reduce before map-reduce was a popular programming paradigm (think Hadoop). This is done by the optimi...Discuss·63 readsSQL Server
Josef Richbergjosefrichberg.com·Jul 10, 2023Efficient calculation of an ISBN-13 check digitI thought I might pass along, what I have found to be, the most efficient way to validate the check digit within Azure SQL Server. I was looking to go down the path of a CLR, but it turns out that seems to be frowned upon. The function returns Y/N. F...Discuss·214 readsSQL Server
Sarang S Babusstechie.hashnode.dev·Nov 18, 2022SQL vs T-SQL vs PL/SQLOverview SQL (Structured Query Language) is an ANSI standard adopted in 1986. Many RDBMS (relational database management system) vendors have used it as a foundation. At the same time, PL/ SQL stands for Procedural Language Extensions SQL, an Oracle...Discuss·1 like·112 readsSQL
Emmanuel Tisseraemmti.com·Oct 14, 2015T-SQL for restoring a databaseBits and pieces of SQL code were gathered for my own use when restoring a database. Best used when back-porting data. Posted as a helper for myself - But feel free to modify and use it. -- INSTRUCTIONS: -- 1. Replace custom_database with the actual...Discuss·44 readsSQL
Emmanuel Tisseraemmti.com·Jul 3, 2013T-SQL - Integer Array - Condition basedT-SQL - Integer Array - Condition based Yesterday, I was presented with a simple problem by a colleague to be completed in SQL Server 2005 Transact SQL. We need to write a complex SELECT statement which will take in some parameters conditionally. ...Discuss·38 readsT-SQL