Click here to Skip to main content
14,027,860 members


Great Reads

by Wonde Tadesse
This tip/trick helps to set a default value for blob data type such as Image, VarBinary.
by Mubin M. Shaikh
Create time dimension with 24 hour plus values and time buckets in your data warehouse
by Harmen Brouwer
How to create and deploy a SSRS rendering extension, explained by a functional Zip Rendering extension for SSRS 2005, 2008 (R2) and 2012.
by Enrique Albert
Baseline WCF Distribution Layer - Decoupling of WCF Services and ViewModels.

Latest Articles

by Mahsa Hassankashi
Best approach for have more secure channel to transfer user information throughout the web
by Mahsa Hassankashi
This article enables you to generate table in any database such as Oracle, SQLServer, MySQL, SQLite, Sybase, etc. just by typing table name and its fields. Then you can use NHibernate facilities to make query for data layer.
by Luca Astolfi
User defined procedure for make an HTML table from T-SQL Select statment
by Amir Jalilifard
In this article, you are going to learn about P2P Network and Windows Communication Foundation to share your files between peers through a P2P network.

All Articles

Sort by Score


16 Jan 2013
Wonde Tadesse
This tip/trick helps to set a default value for blob data type such as Image, VarBinary.
5 Sep 2013
Mubin M. Shaikh
Create time dimension with 24 hour plus values and time buckets in your data warehouse
13 Mar 2012
This tip shows how to rename a database and its MDF and LDF files in SQL Server.
16 Jan 2014
Tom Glick Philadelphia, US
POC to demonstrate passing of collections of complex objects to ASP.NET Web API Controllers.
8 Jul 2010
Md. Marufuzzaman
How easy to read a file without using of the seven extended stored procedures.
16 Mar 2012
Anurag Gandhi
A Query to copy an individual table data between databases
22 Jul 2013
Paw Jershauge
Want your own movie database??? Download IMDB in 20 minutes.
23 Feb 2012
Mahmud Hasan
How to use variable in SELECT TOP SQL command
9 Aug 2011
Jesus Carroll
This brief article show how to install quickly Microsoft SQL Server 2008 Express Edition Standard or with Advanced Services
13 Jan 2013
How to load data from an Excel file to load in a dimension table in an incremental way.
31 Oct 2013
Debopam Pal
How to bring data from Entity model to Excel file using LINQ.
18 Dec 2015
Md. Marufuzzaman
This tip shows you an easy way to split Microsoft SQL Server table row data.
31 Oct 2016
Chris Maunder
Timing SQL calls with millisecond accuracy
17 Feb 2011
John Gathogo
Catastrophic results associated with unqualified use of columns belonging to tables referenced on main query in a subquery
11 Oct 2011
Chris Maunder
1 alternative  
A quick script to enable you to find the processes that are blocking in SQL server
4 Apr 2012
Script Runner that can run multiple SQL script files on MS-SQL.
17 Aug 2012
Update row column with another row column in same table SQL only if it is null.
18 Sep 2012
aasim abdullah
Get all indexes list in detail, with their involved columns
20 Oct 2012
aasim abdullah
How to Refresh Intellisense Cache in SQL Server
4 Sep 2010
Jaime Olivares
How to Insert or Update an SqlGeography object in SQL Server 2008 from a C# application
23 Oct 2012
aasim abdullah
How to use DELETED and INSERTED virtual tables to capture data change in result of any INSERT, UPDATE or DELETE statement.
24 Oct 2012
aasim abdullah
Backup and then restore of a database is a normal job for developers and DBAs. This script will be helpfull to findout, from which path, and which backup file a database was restored.
13 Dec 2012
Paw Jershauge
MS SQL system views, mapped over version.
29 Sep 2013
Mubin M. Shaikh
Create Named Query in Data Source View While Designing OLAP Cube in SSAS
27 Jan 2017
How to create CSV file in SQL
25 Feb 2014
Darek Danielewski
This article demonstrates how to safely dequeue items from a shared table
22 Sep 2017
John Simmons / outlaw programmer
It doesn't always happen the way you expect.
19 Feb 2015
Generate large data series by using Cartesian Product and small data table
23 Jun 2011
When comparing data stored in databases, you don't need to use RTRIM()
17 Aug 2011
How to get a quick list of all DBs using SMO
25 Jan 2012
1 alternative  
How to execute SQL Query / SQL Command on SQL Server using command prompt.
2 May 2012
Chamila Nishantha
2 alternatives  
Simple query to get table column name as rows
27 Nov 2012
Aadhar Joshi
Creating job in sql server which automates taking backup of all stored procedures and functions in physical drive.
1 Dec 2013
Inno Setup script to install SQL Server 2008 R2 with Tools, creating an instance with special rights and displaying the log.
23 Feb 2016
Sifiso W Ndlovu
This tip illustrates a workaround to SQL Server pivoting on variable character data types.
5 Mar 2010
Heino Zunzer
The possibility to build stored procedures with table-valued parameters is a great new feature in SQL Server 2008, especially if utilized with the also newly implemented MERGE-command. Alas, there are some restrictions (TVPs have to be bound to a User-defined Table Type, have to be passed as...
5 Jun 2010
Split User Defined Function, MS SQL Server 2008
8 Feb 2011
Irfan Baig
2 alternatives  
String splitting/tokenizing using T-SQL user defined function.
15 Oct 2011
Chris Maunder
Here's an alternate version that doesn't use sp_who yet provides a little more information. It also provides the option to kill the blocking processes themself.IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ListBlocking]') AND type in (N'P', N'PC'))EXEC...
10 Feb 2012
Ramanujam Shankar
Find missing date periods from a table.
25 Feb 2012
How to concatenate many rows into a single text string using SQL Server 2008.
6 May 2012
This is an alternative for "List SQL Server table column name as rows".
1 Oct 2012
aasim abdullah
How do you know, if someone disabled your job at production database server. Who is the calprit. How to send a mail alert for this change ??
19 Apr 2013
aasim abdullah
Automatic query execution at every instance startup.
18 Jan 2013
Tharaka MTR
This article describes the easiest way to create and process delimited row using SQL XQuery.
24 Apr 2013
Surender Singh (CodeToastDev)
Custom StringPadding functions for SQL Server
19 Sep 2013
Saral S Stalin
Explains how to run a script with higher priority to avoid it getting terminated in a deadlock situation.
23 Sep 2014
By analyzing log-in attempts on SQL server, admins can build the complete picture out of the sequence of events that led to compliance failure or unauthorized access.
21 Jan 2016
This is an alternative for "String splitting/tokenizing using T-SQL user defined function."
8 Mar 2012
Ramanujam Shankar
1 alternative  
Using COALESCE function - concatenate many rows into a single text string output in SQL Server.
20 Feb 2011
1 alternative  
This tip describes how to delete duplicate rows from a table that doesn't have a key.
23 Aug 2011
Anurag Gandhi
I have gone through a lot of examples to sort alpha numeric data in sql. Here is my way:
1 Sep 2013
How to solve when saving changes is not permitted on SQL Server 2008 Management Studio
22 May 2014
Arvind Singh Baghel
Import CSV or txt File Into SQL Server Using Bulk Insert.
14 Mar 2014
Nikita D. Sinelnikov
HowTo: make the report background (elements) of Microsoft .NET Report (.rdlc) non-printable
11 Nov 2013
Find column or Text in entire stored procedure
3 Dec 2014
Perform SQL Server Instance health check simultaneously on more than one server using Powershell
18 Dec 2012
Mannava Siva Aditya
Uploading an image and displaying it on the UI page
8 Jun 2015
Diluka Wittahachchige
Creating SQL Server database project use in Visual Studio 2012 and maintain versions use in TFS
12 Nov 2013
Jobless Creature
CTE To find all the related nodes in a hierarcy
25 Aug 2016
Gene R. Browning
Generate random dates (and times if you like) for your test data environment.
24 Apr 2012
SQL scripts to insert File to BLOB field and export BLOB to File
21 Feb 2010
Md. Marufuzzaman
Get accurate age by date using MS SQL Server
12 Apr 2016
Shao Voon Wong
How to prevent SQL injection attacks when using dynamic SQL in stored procedures
4 May 2012
Tip to create a database application using C# .NET in the shortest time possible.
24 Jul 2013
Kumar Pankaj Verma
Truncating log file in SQL Server using T-SQL when log file is too large and database becomes unresponsive.
25 Feb 2010
Md. Marufuzzaman
This is a very simple use of SQL Server global variables. Microsoft SQL Server provides a massive number of global variables, which are very effective to use in our regular Transact-SQL. Global variables represent a special type of variable. The server always maintain the values of these...
18 Dec 2013
How to get the current time from any time zone
23 Dec 2015
Md. Marufuzzaman
A simple tip/trick to get rows on n’th maximum number from a table
6 Jun 2013
Nelson Kosta Souto
Find text in Stored Procedures, View, Trigger, and Function.
20 Sep 2016
Automatic creation of non clustered indexes using system SQL entities
23 Jul 2012
Paul M Simpson
Expanding a string by inserting alternating single spaces between characters
5 Jun 2015
Dathuraj Pasarge
Know whether your databases are backed up successfully in the last 24 hours or not !!!
9 Mar 2016
This tip describes how to generate insert SQL statement from the records in an existing table in SQL server database
19 Oct 2013
rowversion datatype in SQL Server: Track which row has been modified
13 Jun 2012
How to create ShoppingCart using Gridview in with code VB
19 Aug 2013
Find all the days between two dates using SQL Server
5 Jan 2011
Hiren solanki
Building hirarchy in the sense of hirarchy of manager, employee though both are an employee of an enterprise but both are related or depend on hierarchical level.
15 Jan 2012
Dhol Gaurav
Get Tables List With Its Dependent Tables Names
10 Nov 2013
A unique feature of SQL SERVER Loop with Go statement
12 Dec 2016
Suresh Dasari's
Auto Generate Code (CRUD) for 3 Layered architecture (Entity, Data Access & Business Layer) with Stored Procedures based on table design.
19 Dec 2015
Md. Marufuzzaman
A simple example of Microsoft SQL Server Pad String
28 Apr 2010
Gordon Kushner
By using recursion (and CROSS JOINS), you can generate data without looping or hard-coding INSERT statements into a temporary table.In the example below, you can use recursion to generate a week of scheduling data for three employees. -- Count variable, set to 7 for a week's worth of...
27 Mar 2012
SA - Hibbert
Return all records between two dates that include time in SQL.
2 Mar 2013
Syed Moula Ali
Replicate/Clone/Duplicate selected data in a Table using merge statment
2 Oct 2012
aasim abdullah
A simple query to get all databases size on a given instance.
3 Sep 2014
Rohan Kishor Garud
RoundhousE (RH) is a database migrations engine that uses plain old SQL Scripts to transition a database from one version to another.
2 Nov 2012
aasim abdullah
You have place indexes but still queries are slow... are you facing bookmark lookup problem ???
4 Nov 2013
SQL script for creating ASP.Net Identity Database
19 Apr 2013
aasim abdullah
The TOP clause is commonly used to get the top required rows from a result set. The beauty of this clause is that it can be used with the WITH TIES clause to retrieve all similar rows to a base result set.
18 Jul 2012
Omar Frometa
Grouping Sets is the new SQL Server 2008 Operator
26 Oct 2015
Hernán Hegykozi
This tip will show how to perform a backup and restore database from an application in VB.NET 2010.
7 Aug 2012
encrypt all stored procedures in SQL server with powershell
29 Nov 2013
Mehdy Moini
Implementing a map as a tree, and finding the shortest path, between the streets, is what you will see.
21 Dec 2016
Finds the Best Table for a given set of columns
24 Jan 2013
Rajesh Manjarekar
How do I set FileSpec dynamically for looping files in a foreach loop container?
30 Jun 2012
Ameet Parse
This article describes How to find a Text in Stored Procedure (Checked on SQL Server 2008)
18 Jun 2010
Alexander Konstantinov
Two stored procedures helping developers do less things when they create tables and indeces
18 May 2010
Dimitri Witkowski
Recently I had a problem: I was developing a logon trigger for SQL Server, and there was a bug in it. After deploying the trigger to the server he didn't allow me to login anymore. I was in panic and thought I would have to reinstall SQL Server.Fortunately, I've found a solution how to...
29 May 2012
Harsh Gandhi
Generate XML Using FOR XML ; Difference between different modes (AUTO, RAW, PATH, EXPLICIT) of FOR XML to generate XML in SQL Server
18 Dec 2012
Writeback and writethrough using C# with SQL Server 2008 SSAS.
25 Feb 2013
Triki game created in SQL Server with triggers.
6 May 2013
Hernán Hegykozi
This tip explains how to calculate the Check Digit Vertical (CDV) and Horizontal (CDH) by SQL Server.
2 Oct 2014
Trung Nguyen Son
How to analyse and tune your dotnetnuke site to get best performance.
28 May 2013
Bob Crowley
How to use a CASE statement in ORDER BY to avoid dynamic SQL
2 Feb 2018
Luca Astolfi
User defined procedure for make an HTML table from T-SQL Select statment
22 Oct 2013
Muhammad Aqib Shehzad
Forgot Password and Email Check from Database
14 Feb 2011
Hajo Messner
There is a little inconsistence in this function, because the @Tokens Elements and the @Delimiter parameter are of data type NVARCHAR (=Unicode) while the @String parameter is of data type VARCHAR (=ANSI). If the @String parameter can be Unicode, it must be declared as NVARCHAR. If the @String...
2 Sep 2011
Ron sikander
Find out the number of duplicates in the table:select count(*), VISTX_ST_FIPS,VISTX_CTY_FIPS,VISTX_TC from TR00.NV_STARTER_INDEXgroup by VISTX_ST_FIPS,VISTX_CTY_FIPS,VISTX_TC having count(*)>1--- Delele them using following statementDELETEFROM TR00.NV_STARTER_INDEXWHERE...
14 Jan 2012
Robby Tendean
How to do SQL atomic operations on UPDATE and DELETE syntax.
3 Feb 2012
SQLCMD can be used to login to the Sql Server as well. One can only provide Server address, User Name and Password at the command prompt and press enter.The command prompt will change to 1>. Now any sql query can typed and by pressing enter in the next prompt a GO command and pressing enter...
25 Feb 2012
Sanjay K. Gupta
How to concatenate many rows into a single text string using SQL Server 2008
19 Mar 2012
Saral S Stalin
Simple query to find the available hard disk space in the server
3 May 2012
This is an alternative for "List SQL Server table column name as rows"
20 Jul 2012
Mr. Joydeep Das
What the effects of Ordering in Index
2 Oct 2012
aasim abdullah
Using SQL Server Management Studio, have you ever come a cross following questions: Why every time, a new query window is open with MASTER database.? On opening SQL Server Management Studio, I need a new query window automatically ?
1 Nov 2012
aasim abdullah
A stored procedure can be called from another stored procedure as nested stored procedure. How to get a list of these stored procedures with their nested one
14 Nov 2012
Sadeque Sharif
Another way to solve the issue of “A network-related or instance-specific error occurred while establishing a connection to SQL Server…”
3 Dec 2012
Create a table from a Varchar list value
3 Jan 2013
Levente Kupás
CLR-addon for T-SQL DATE transformation and Split-String
4 Jan 2013
Grouping dynamically on different columns in single query
7 Jun 2013
Purushotham Agaraharam
Creating a parameterised report using SSRS.
15 Mar 2012
Ganu Sharma
Loop through/split a delimited string.
13 Mar 2015
Rajesh Manjarekar
When CDC is turned ON against a table and the underlying table schema changes, such as adding/removing a column, changing datatype etc
31 Jul 2014
Kale Yogesh
How to Partition Table in SQL
14 Jun 2013
Single Stored Procedure for delete/retrieve all table of records
19 Apr 2013
aasim abdullah
Restore failure from Enterprise to Standard edition in SQL Server.

Advertise | Privacy | Cookies | Terms of Service
Web05 | 2.8.190419.4 | Last Updated 21 Apr 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid