Forum Replies Created

Viewing 13 posts - 1 through 13 (of 13 total)

  • RE: TABLESAMPLE

    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...

  • RE: Deleting Duplicate Records

    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...

  • RE: Deleting Duplicate Rows

    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...

  • RE: Query plan re-use

    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...

  • RE: Passing Table Value Parameters to a stored procedure

    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...

  • RE: Can we align parameters of Report in selection

    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...

  • RE: Date string in WHERE causes table scan instead of index seek

    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(*)...

  • RE: How to Schedule a SQL Server Database Creation Script

    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...

  • RE: BCP Trigger Hangs up Insert Statement

    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...

  • RE: 9 Things to Do When You Inherit a Database

    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...

  • RE: Problem starting SSAS 2005

    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...

  • RE: Insert trigger not working when update trigger enabled

    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 ...

  • RE: How To Get Table Row Counts Quickly And Painlessly

    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(*)...

Viewing 13 posts - 1 through 13 (of 13 total)