Viewing 13 posts - 1 through 13 (of 13 total)
Sometimes our table contains large number of records where we need to retrieve some of them (randomly). The TABLESAMPLE clause in SQL Server allows to extract a sampling of rows...
June 15, 2010 at 2:19 am
The query will be composed this way:-
WITH TempUsers (FirstName,LastName, duplicateRecordCount)
AS
(
SELECT FirstName,LastName,
ROW_NUMBER()OVER(PARTITIONBY FirstName, LastName ORDERBY FirstName) AS duplicateRecordCount
FROM dbo.Users
)
DELETE
FROM TempUsers
WHERE duplicateRecordCount > 1
GO
Instead of TempUsers you can give...
April 28, 2010 at 7:23 am
The query will be composed this way:-
WITH TempUsers (FirstName,LastName, duplicateRecordCount)
AS
(
SELECT FirstName,LastName,
ROW_NUMBER()OVER(PARTITIONBY FirstName, LastName ORDERBY FirstName) AS duplicateRecordCount
FROM dbo.Users
)
DELETE
FROM TempUsers
WHERE duplicateRecordCount > 1
GO
Instead of TempUsers you can give...
April 28, 2010 at 7:06 am
he syntax and converts the query into relational algebric expressions. Then the query optmizer constructs the execution plan based on several rules and cost of executing the query. Once the...
April 19, 2010 at 4:13 am
In SQL Server Database we can check the record before insert to the database and insert the record to the database by creating a store procedure as follows:
CREATE...
April 15, 2010 at 1:05 am
Some times we want to display some dynamic content like database-driven value to appear in the page header and footer section in the SQLReport, that functionality can be acheived...
March 30, 2010 at 6:44 am
Sometimes there is a need to get the record count of every table in a SQL Server database. The common method used for achieving this is doing a select count(*)...
March 30, 2010 at 6:07 am
SQL Server Management Objects (SMO) are objects designed for programmatic management of Microsoft SQL Server.
We can integrate SMO into any .NET based applications.
SMO is also compatible with SQL Server...
March 25, 2010 at 6:55 am
In SQL, after creation of table we insert data using INSERT keyword. Suppose we have to insert 10 records, we write 10 INSERT statement for inserting them. However, in SQL...
March 18, 2010 at 1:02 am
A lot of times we need a change . While working on an existing database, we may need to change the database name and in some cases want to...
March 17, 2010 at 1:42 am
We can check whether SQL express is installed on a machine or not and then can install it along with our application.Following is the code sample in VB.NET to implement...
March 9, 2010 at 6:51 am
Sometimes we need to audit all DML operations for tables in a MSSQL database. There are many methods for achieving this, one of the most common approaches is using ...
February 12, 2010 at 12:04 am
Sometimes there is a need to get the record count of every table in a SQL Server database. The common method used for achieving this is doing a select count(*)...
February 9, 2010 at 2:46 am
Viewing 13 posts - 1 through 13 (of 13 total)