Aspdotnet-Suresh

aspdotnet-suresh offers C#.net articles and tutorials,csharp dot net,asp.net articles and tutorials,VB.NET Articles,Gridview articles,code examples of asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

Showing posts with label SQL Server. Show all posts
Showing posts with label SQL Server. Show all posts

SQL Server Convert Table Data to XML Format using XML PATH, XML AUTO or XML RAW

Oct 20, 2014 4 comments
Introduction:

Here I will explain how to convert table data to xml format in
sql server or get table data in xml format in sql server. We can convert sql server table data in xml format by using XML AUTO or XML PATH or XML RAW.
Description:
In previous articles I explained SQL Server Get Data in XML format  group by columns, Reading XML data file using SQL query, Pass XML file as parameter from C# to SQL stored procedure, cursor example in sql server and many articles relating to SQL server. Now I will explain how to convert table data to xml format in sql server or get table data in xml format in sql server.

SQL Server - Get Data in XML Format Based on Group by Columns in SQL Server with Example

Oct 19, 2014 0 comments
Introduction:

Here in
sql server I will explain how to get data in xml format based on group by columns in sql server with example or sql server group columns and show in xml format.
Description:
In previous articles I explained cursor example in sql server, While loop example in sql server, nested while loop example in sql server, get only month and year from date in sql server, substring function in SQL server and many articles relating to SQL server. Now I will explain cursor how to get data in xml format based on group by columns in sql server with example.

SQL Server Cursor Example | Simple (Basic) Cursor Example in SQL Server

Aug 10, 2014 2 comments
Introduction:

Here I will explain cursor in
sql server with example or simple cursor example in sql server and how to use cursor in sql server. Cursor in sql server is used to retrieve set of data from table, loop through each record row by row, and modify the values based on requirements.
Description:
In previous articles I explained While loop example in sql server, nested while loop example in sql server, get only month and year from date in sql server, substring function in SQL server and many articles relating to SQL server. Now I will explain cursor in sql server with example.

To use cursor in sql server that syntax will be like as shown below

Asp.net Preventing SQL Injection Attacks using Parameterized Queries

Aug 3, 2014 0 comments
Introduction:

Here I will explain how to prevent
SQL injection attacks in asp.net website with example using c#, vb.net. SQL injection means injecting some SQL commands in SQL statements to hack your data or delete data or change your data in tables via web page input.

Description:

In previous posts I explained
SQL injection example in Asp.net, SQL Server insert multiple rows with single insert statement, how to send mail with attachment in asp.net and many more articles related to asp.net, SQL, c#, vb.net. Now I will explain how to prevent SQL injection attacks in asp.net website with example using c#, vb.net.

To prevent SQL injection attacks we need to use parameterized queries to pass values from code behind to database like as shown below

SQL Injection Attack Example in Asp.net using C#, VB.NET

1 comments
Introduction:

Here I will explain what are sql injection attacks in
asp.net website with example and how to prevent SQL injection attacks in asp.net using c#, vb.net with example. SQL injection means injecting some SQL commands in SQL statements to hack your data or delete data or change your data in tables via web page input.

Description:

In previous post I explained jQuery scroll to particular position of div when click on link, SQL Server remove duplicate records from table, SQL Server insert multiple rows with single insert statement,
how to send mail with attachment in asp.net and many more articles related to asp.net, SQL, c#, vb.net. Now I will explain what is sql injection attack in asp.net website with example.

Generate Script in SQL Server 2008 to Export Database

Jul 31, 2014 3 comments
Introduction:

Here I will explain how to generate script in
sql server 2008 to export database or Export database in sql server with script.
Description:

SQL Server Remove Duplicate Records (Rows) from a Table

Jul 28, 2014 8 comments
Introduction:

Here I will explain how to remove duplicate records from a table in SQL server or delete duplicate rows or records in sql server or removing duplicate records using sql server or sql server delete duplicate records or rows from table
Description:
In previous articles I explained about substring function in SQL server and Replace function in SQL Server and I explained how to delete duplicate records from datatable in asp.net. Now I will explain how to delete duplicate records from a datatable in SQL server. 

During work with one application I got requirement like get the unique records from datatable in sql server. Actually our datatable does not contain any primary key column because of that it contains duplicate records that would be like this

SQL Server - Insert Multiple Rows with One Insert Statement

Jul 27, 2014 3 comments
Introduction:

Here I will explain how to insert multiple rows into table with single insert query in
sql server or sql server insert multiple records in table with one insert statement with example.
Description:
In previous articles I explained SQL Server Get total rows count in union query, SQL Server Difference between Union and Union All, SQL Server Replace multiple spaces in string with single space, SQL Server Remove html tags from string and many articles relating to SQL server. Now I will explain how to insert multiple rows into table with single insert query in sql server.

To insert multiple rows into table with single insert query in sql server we can follow different methods like as shown below

SQL Server - Get Total Records Count in Union Query

3 comments
Introduction:

Here I will explain how to get total records count of union query in
sql server 2008 or sql server query to get total records of union statement with example.
Description:

SQL Server - Difference between Union and Union All

Jul 23, 2014 7 comments
Introduction:

Here I will explain difference between UNION and UNION ALL in SQL serverUnion operator will return unique records from tables and Union All in SQL server will return all the records from the tables including duplicate values also.

Description:

In previous articles I explained SQL Server change identity column value,  replace multiple spaces with single space in sql, reseed identity column value in sql server, get only month and year from date in sql server, substring function in SQL server and many articles relating to SQL server. Now I will explain difference between UNION and UNION ALL in SQL server.

Generally Union Operators are used to combine the result of two or more select queries into single result set.

SQL Server - Difference between Cursor and While Loop with Example

Jul 14, 2014 4 comments
Introduction:

Here I will explain difference between cursor and while loop in
sql server with example or explain cursor vs while loop with example in sql server. Cursors in sql server allow you to fetch a set of data, loop through each record, and modify the values as necessary; then, you can easily assign these values to variables and perform processing on these values. While loop also same as cursor to fetch set of data and process each row in sql server.
Description:

SQL Server Remove (Drop) index from table

Jun 30, 2014 0 comments
Introduction:

Here I will explain how to remove index from table in
sql server 2008 or drop index from table in sql serverTo remove index from table we use drop index statement in sql server.
Description:
In previous articles I explained create index on column in sql server, SQL Server change identity column value,  replace multiple spaces with single space in sql, reseed identity column value in sql server and many articles relating to SQL server. Now I will explain how to remove index from table in sql server 2008.

To create index on column in sql server that syntax will be like as shown below

SQL Server Create Index on Column in Table with Example

1 comments
Introduction:

Here I will explain how to create index on column in
sql server 2008 or create index on multiple columns in sql server or create index on table in sql server 2008 with example.
Description:

Install Northwind Pubs Sample Database SQL Server 2008

Jun 24, 2014 1 comments
Introduction:

Here I will explain how to download and install northwind and pubs sample database in
sql server 2008 or attach northwind database in sql server 2008 r2  using sql server management studio.
Description:
In previous articles I explained replace multiple spaces with single space in sql, reseed identity column value in sql server, get time difference between two dates in sql, substring function in SQL server and many articles relating to SQL server. Now I will explain how to install northwind sample database in sql server 2008.

To install northwind and pubs sample databases in sql server 2008 you need to follow below steps

SQL Server - How to Remove Special Characters from String in SQL Server 2008

Jun 2, 2014 4 comments
Introduction:

Here I will explain how to remove special characters from string in
sql server 2008 with spaces or sql server replace special characters in string with spaces in sql server 2008 or replace unwanted characters in string in sql server.
Description:
In previous articles I explained replace multiple spaces with single space in sql, reseed identity column value in sql server, get time difference between two dates in sql, substring function in SQL server and many articles relating to SQL server. Now I will explain how to remove special characters from string with spaces in sql server 2008.

SQL Server Replace Multiple Spaces in String with Single Space

May 29, 2014 4 comments
Introduction:

Here I will explain how to replace multiple spaces in string with single space in
sql server or sql server replace multiple spaces with one space in string or sql server remove extra multiple spaces from string without using any while loop.
Description:
In previous articles I explained replace function example in sql server, Query to remove first and last character from string in sql server, remove html tags from string in sql, substring function in SQL server and many articles relating to SQL server. Now I will explain how to replace multiple spaces in string with single space in sql server.

To replace multiple spaces in string with single space in sql server we need to write the query like this

SQL Server - How to Change (Reseed) Identity Column Value in SQL Server 2008

May 14, 2014 6 comments
Introduction:

Here I will explain how to change identity column seed value in SQL server 2008 or reseed identity column seed value of table in SQL server or how to change identity column value in SQL server.
Description:

In previous post I explained how set identity or auto increment column in SQL server, Custom auto increment column in sql server, resent identity column in sql server and many articles related to SQL server. Now I will explain how to change or reseed identity column value in SQL server.  I have a one table in that I set identity property on particular column and inserted few records in table while inserting new records identity column value automatically increased that would be like this
© 2015 Aspdotnet-Suresh.com. All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.