web analytics

Category: SQL Server

0x8002801D Library not Registered.. Cannot create any BI project. 0

0x8002801D Library not Registered.. Cannot create any BI project.

  An annoying error coming up while creating any Business Intelligence project from SQL studio. Error says that it cannot open a specific temp file. I have deleted all my BI settings but not...

Removing Duplicates through SQL Query 1

Removing Duplicates through SQL Query

Suppose we have a table in SQL Server, that has duplicates in it. CREATE TABLE T1 ( ProductName varchar(50) ) INSERT INTO T1 VALUES (‘Computer’), (‘Computer’), (‘Printer’), (‘Printer’), (‘Printer’), (‘Scanner’), (‘Scanner’), (‘Scanner’), (‘Scanner’), (‘Camera’),...

SqlBulkCopy – Bulk Insertion in SQL Server from .NET 0

SqlBulkCopy – Bulk Insertion in SQL Server from .NET

Many a times there come a scenario when you have to insert large number of records in sql server. There are number of ways to implement this scenario: through looping techniques to call insert...

Write a Custom SQL Scripter (Generating bulk insert, update statements) 1

Write a Custom SQL Scripter (Generating bulk insert, update statements)

There are always some static tables in our database that needs to always have some default values in them, for our custom application development. Usually a huge amount of data resides in these tables...

Validating string for numeric values in SQL Server 0

Validating string for numeric values in SQL Server

What to do when you have a large string and you have to validate whether this string only contain digits or not. A straight thing that comes in our mind is to use a...

SQL Server permissions 0

SQL Server permissions

Permissions on data are one of the most critical aspects of database administration. If you’re too strict as a database administrator then your users will not be able to do their jobs. If you’re...

How To Calculate the Number of Week Days Between two Dates 1

How To Calculate the Number of Week Days Between two Dates

If the start date and end date are both week days, then the total number of week days in between is simply: (total difference in days) – (total difference in weeks) * 2 DateDiff(dd,...

SQL Server Version 0

SQL Server Version

If you need to know the version you are currently running of SQL Server you can easily get it by running the following query. SELECT ‘ SQL Server ‘ + CONVERT ( varchar (...

Simple script to backup all SQL Server databases 0

Simple script to backup all SQL Server databases

Problem Sometimes things that seem complicated are much easier then you think and this is the power of using T-SQL to take care of repetitive tasks. One of these tasks may be the need...

Demand Paging (Custom Paging) in ASP.NET with SQL Server 0

Demand Paging (Custom Paging) in ASP.NET with SQL Server

Many a times we need to present bulk data to the user in our day to day application development. Loading all data at one shot is okay when we have few hundreads data but...