Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Everything / Languages / T-SQL

T-SQL

T-SQL

Great Reads

by Marian Placko
This article shows a simple hack of a built-in MS SQL Server WITH ENCRYPTION mechanism
by Snorri Kristjansson
A SQL server CLR Stored Procedure that can query the Active Directory directly in T-SQL code
by hector [.j.] rivas
Helping the combo box autocomplete function with a frequency count.
by mazhou
Ad-hoc pagination support with SQL Server codenamed “Denali”

Latest Articles

by Marian Placko
This article shows a simple hack of a built-in MS SQL Server WITH ENCRYPTION mechanism
by Snorri Kristjansson
A SQL server CLR Stored Procedure that can query the Active Directory directly in T-SQL code
by hector [.j.] rivas
Helping the combo box autocomplete function with a frequency count.
by mazhou
Ad-hoc pagination support with SQL Server codenamed “Denali”

All Articles

Sort by Score

T-SQL 

by Snorri Kristjansson
A SQL server CLR Stored Procedure that can query the Active Directory directly in T-SQL code
by hector [.j.] rivas
Helping the combo box autocomplete function with a frequency count.
by tranthanhtu.vn
In this article, We will learn why do we need to manage the stages of our application.
by tranthanhtu.vn
In this article, we will learn how to build and deploy the code
by Ed Wiebe
Can't we obtain the benefit of using bitwise operators for SQL many-to-many relationships AND maintain referential integrity?
by RovenetBill
ASP.NET c# component for editing SQL tables with plug-in column format adapter architecture.
by Dathuraj Pasarge
Database mirroring setup without any DBA effort - on every new database creation
by Tomáš Bauer
Capture of a Typical SQL Server Database Workload
by Jovan Popovic(MSFT)
How to easily compare two rows in SQL Server using new JSON functionalities
by Redgate Software
Continuous integration makes development more efficient – allowing bugs to be caught earlier, and providing rapid validation. But for too long, it hasn’t been standard practice for databases. This is an overview of implementing CI so you can bring database code in line with application development.
by Miljan Radovic
Script to generate DimDate for specified date range
by Joseph Franklin S
A deeper look at Cross Apply and Outer Apply
by Martin Lachman
How to create a system on MS SQL Server for detection of actual changed records in a database table.
by Dr Bob
SQL Server ISS can simplify database mirrors across multiple vendors
by Kuv Patel
Debug stored procedures in Visual Studio and SQL Server Management Studio.
by Kuv Patel
Decrypt Stored Procedures, Views, Functions, and Triggers in SQL Server
by Steven L. Wentworth (12896862)
Straightforward generation of and ensuring accuracy for DimDate values
by honey the codewitch
Deep dive some advanced source generation in a real world application
by saddam_msp
Download files using T-SQL server which is very much faster then any other option.
by Herman.Instance
In this article, the creation of dynamic pivots are explained. This works on SQL Server from version 2005 and above!
by Mubin M. Shaikh
Walkthrough of the process for one of the industry best practices to export all SQL tables in Flat file format
by Code Effects
This article discusses the use of one such new feature, namely, rule-based filtering of LINQ queries using Web Rule, the XML-based super-fast rules engine, implementable as an ASP.NET or MVC component.
by AhsanAhmed
A brief introduction on how to use FOR XML clause in AUTO mode in Microsoft SQL Server to return data in XML format
by AhsanAhmed
A brief introduction on how to use FOR XML clause in EXPLICIT mode in Microsoft SQL Server to return data in XML format
by AhsanAhmed
A brief introduction on how to use FOR XML clause in RAW mode in MS SQL Server to return data in XML format
by DaveNoderer
In this article, we explore how to set up one component, an SQL pool.
by Aqeeel
Having not ONE but TWO Identities in a single SQL Server Table
by Sergii Syrovatchenko
Starting from SQL Server 2005, the default trace is enabled by default on every SQL server. Default trace is a lightweight system trace, which stores a lot of useful information about the changes in the system...
by Gene R. Browning
Get a quick look at your data characteristics using this tool.
by mahmood kabi
extract overlapped polygons and calculate the overlapped area and write an API for it
by Stellar Data Recovery
Discover step-by-step instructions to repair SQL databases with DBCC CHECKDB, plus explore advanced tools for a quick and secure repair.
by sunettew
In this article we will show how you can use SSIS with geometry and intersect.
by Bob Crowley
In this article, I will explain the sometimes surprising behavior of  the ADO.NET SqlParameter and particularly the effects of ParameterDirection, null value and DBNull.Value on how the parameter is sent to the database.
by Redgate Software
SQL Clone exploits the existing virtualization technology within Windows to take much of the sting out of the traditional problems surrounding database provisioning.
by DaveDavidson
In this article, I show LINQ to Entities syntax that will produce queries with CROSS APPLY and LEFT OUTER JOIN clauses.
by meduff
Avoid Entity Framework lazy-loading relationship navigation when iterating large record sets.
by Srinivasa Dinesh Parupalli
Importing Documents from SQL Server to Azure Cosmos DB
by Afzaal Ahmad Zeeshan
.NET Core 2.0 brings a lot of improvements to the system, and it brings a lot of pain to the developers as well. I had a lot of problems upgrading .NET Core 1.x apps to .NET Core 2.0; I yet have to feel the promise it makes about performance and so, but let us see how to upgrade our existing applica
by Mahsa Hassankashi
This article illustrates how to use Node.js by WCF which is written in C# and using node.js as real time communication technology with the aid of C# code to connect MS SQL Server.
by IChechin
How to implement free OLAP cube in your project
by Emmanouil Gimissis MSc ICSD
Calculating progressive sums in T-SQL
by Rahul_Biswas
A simple explanation of the recursive CTE concept of T-SQL
by honey the codewitch
Embed fast streaming C# code to match text based on inputted regular expressions
by Chris_Yates
When managing a large amount of servers and databases, having an efficient way to search for objects in a particular database, SQL Server instance or the object metadata is crucial. DBA Chris Yates tells us why SQL Search from Red Gate helps him achieve this with ease, and at no cost.
by Miljan Radovic
Simple, open-source, fully customizable, lightweight SQL Server scheduler
by tranthanhtu.vn
How to build the SPA for enterprise application using Angular2 and WebApi (RESTful)
by jurhas
Supervisory Control and Data Acquisition for ARDUINO
by Daniel JXHV
No more ORM, EF, A Stored Procedure direct Access framework for JavaScript.
by Federico Di Marco
spSearchTables: a helper T-SQL stored procedure for digging into (large) databases
by Redgate Software
If you could gain an extra hour in your working day, what would you spend it on? One way to save time and work efficiently, is to use tools available at your fingertips. Learn how SQL Prompt Core, included free in Visual Studio Enterprise, helps you speed up working with SQL and be more productive.
by Tim Corey
The developer’s guide to writing powerful SQL commands while avoiding the pitfalls that come from an incomplete knowledge of what is going on under the hood.
by Tim Corey
The developer's guide to getting the right information out of mountains of data. Learn how to boil down the data into useful information while being confident that you haven't left any data behind.
by Ryan G Conrad
Prevent brute-force login attacks on a remotely accessible SQL Server database using T-SQL
by Ryan G Conrad
Additional logging and data collection
by Ryan G Conrad
More configurations and auditing tools
by Ryan G Conrad
Using Powershell and Windows Task Scheduler API to detect malicious login attempts on a remotely accessible SQL Server database
by Huisheng Chen
Monitor SQL Server processes and jobs, view executing SQL query, kill process / job, object explorer, database shrink/log truncate/backup/detach/attach, object version control & compare
by Daniel Miller
This article describes standard naming conventions for tables and columns, and it provides code that leverages the conventions to visualize dependencies and automatically validate and generate foreign key constraints.
by Alexandros Pappas
This project provides utilities for SQL server, such as executing a list of SQL scripts, exporting data to an SQL script, and displaying relationships between records.
by Alexandros Pappas
An SQL script to see the table hierarchy in a database.
by Christian Graus
The first in a series of articles seeking to explain the intermediate to advanced features of T-SQL
by Robert Vandenberg Huang
An Entity Framework log printer that converts SQL commands to executable T-SQL statement
by Zahid Nawaz Ch.
SqlDependency ,can be used to pick changes without executing query to see there is any update from database , WHERE CLAUSE can also be applied for narrowing scope, Its way to push changes from SQL Server to SQLDependency , .NET library , SQL Server Broker service sends updates to SQLDependency.
by Sergei Y.Kitáev
Introduction to statically parameterized SQL language
by dale.newman
Google your SQL.
by Md._Mehedi_Hasan
CRUD operation in .net MVC using Stored Procedure for Single and List Object Data along with SQL Transaction.
by Manjuke Fernando
Observations made for a strange behavior on JSON_VALUE when table contains blank and non-blank values
by Dahal Mahesh
Migrate cold data from your table to Microsoft Azure for cost effective and efficient storage of data, without any code level changes.
by Member 11127135
The ETL Process and Range Lookups
by Steven L. Wentworth (12896862)
Using combination arithmetic to improve quality of SQL table design and execution
by Alex_2979
A lot of modern Business Intelligence solutions offer to transfer work of analysts to developers or rise technical level of business analysts, make them closer to developers. Instead of it, I advise to consider a solution, which takes information from Database and gives it to business analysts.
by Jesus Carroll
Despite the references of several sources of unattended installation of Microsoft SQL Server Database Engine, in this article describes a script tested in real production environments and it can be used with minimal or - perhaps - no modifications.
by Frank J. Yang
This article provides code for decoding strings that have been encoded for URL transmission in pure T-SQL that works properly for all URL encoded strings.
by Mark W Solomon
In this article, I developed a way to determine all the SQL Servers in our environment at will and filter this information into Microsoft's Sunset report for Microsoft SQL Server and present all this information in an SSRS report.
by Roman Ivantsov
The article provides a comparative analysis and gives patterns of using explicit locks to manage concurrent access to database documents (data split over multiple tables) in MS SQL Server, MySql, PostgreSql and Oracle. As it turned out, the solution is not always obvious or simple.
by Gunnar S
Third article in a series of three regarding NServiceBus, WebAPI and Azure Service Fabric
by Dirk Bahle
A quick guide to managing 100000'ish records efficiently with SQLite and C#/.Net.
by Tom Glick Philadelphia, US
Using WCF REST Service to call Stored Procedures and run queries on SQL Server.
by Rahul S Chavhan
Validate an XML document in SQL Server using XSD by Rahul Chavhan
by Mr. xieguigang 谢桂纲
Easy way to map the table in the mysql database.
by Jovan Popovic(MSFT)
Learn about various use cases how you can leverage JSON support in SQL Server and Azure SQL Database
by Anuja Pawar Indore
Multi-Tenancy means same instance shared amongst all customers.