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 While Loop Example with stored procedure

Nov 6, 2012 1 comments
Introduction

Here I will explain how to use while loop in SQL Server stored procedure with example.

Description

In previous articles I explained Find First and last day of current month in SQL, Convert Rows to Columns in SQL, Joins in SQL Server and many articles relating to SQL Server.  Now I will explain how to use while loop in SQL Server stored procedure with example.

SQL Query to Find First and Last Day of Current Month or Previous Month

Oct 30, 2012 11 comments
Introduction:

Here I will explain how to write query to get or find first and last day of current month or previous month in 
SQL server.
Description:
In previous articles I explained DateAdd function Example, Pass table as parameter to procedure, difference between function and stored procedures, joins in SQL Server, substring function in SQL server and many articles relating to SQL server. Now I will explain query to get first and last day of current month in SQL server.

SQL Server DATEADD Function Example to Add or Subtract Dates

2 comments
Introduction

In this article I will explain how to use DATEADD function to add or subtract specified time interval from dates in SQL Server.

Description:

In previous articles I explained Substring function Example, SQL Query to remove first and last character from string and many articles relating to SQL Server. Now I will explain how to use DATEADD function to add or subtract specified time interval from dates in SQL Server.

SQL Server Get Created, Last Modified date of Stored Procedure or Table

Oct 25, 2012 5 comments
Introduction:

In this article I will explain how to find or get last modified date and created date of stored procedure or table in SQL server.
Description:
In previous articles I explained difference between function and stored procedures, joins in SQL Server, substring function in SQL server and many articles relating to SQL server. Now I will explain how to get last modified date or created date of stored procedure or table in SQL server.

SQL Server Retrieve Data from Multiple Tables using Joins

Oct 12, 2012 9 comments
Introduction:

In this article I will explain how to retrieve data from multiple tables in sql server.

Description:

In previous post I explained Difference b/w functions and stored procedures, Pass table as parameter in SQL Server 2008, differences between char, varchar and nvarchar, difference between tinyint,smallint,int,bigint and many articles relating to SQL Server. Now I will explain how to retrieve data from multiple tables in SQL Server.

SQL Server - Differences between Functions and Stored Procedures

Oct 7, 2012 6 comments
Introduction:

Here I will explain the difference between stored procedure and function in SQL Server.

Description:

In previous posts I explained difference between Left Join and Left Outer Join, Difference between Len and DataLength and many articles relating to SQL Server. Now I will explain the difference between stored procedure and function in SQL Server.

SQL Server 2008- Pass Table as Parameter to Stored Procedure Example

Sep 23, 2012 9 comments
Introduction:

In this article I will explain how to pass table as parameter to stored procedure in SQL Server 2008.

Description:

In previous articles I explained Convert Rows to Columns, Query to get data between two dates, Query to get duplicate records count, Query to remove duplicate records and many articles relating to SQL Server. Now I will explain how to pass table as parameter to stored procedure in SQL Server 2008.

SQL Server- Difference Between Full Outer Join and Cross Join

Sep 22, 2012 2 comments
Introduction:

Here I will explain what is the difference between cross join and full outer join in SQL Server.

Description:

In previous posts I explained difference between Left Join and Left Outer Join, difference between ExecuteNonQuery, ExecuteReader, ExecuteScalar, Difference between Len and DataLength and many articles relating to SQL Server. Now I will explain the difference between cross join and full outer join in SQL Server.

SQL Server- Difference Between Left Outer Join and Right Outer Join

2 comments
Introduction:

Here I will explain differences between left outer join and right outer join in SQL Server.

Description:

In previous posts I explained difference between ExecuteNonQuery, ExecuteReader, ExecuteScalar, Difference between Len and DataLength and many articles relating to SQL Server. Now I will explain the difference between left outer join and right outer join in SQL Server.

SQL Server- Difference Between Left Join and Left Outer Join

Sep 21, 2012 0 comments
Introduction:

Here I will explain the difference between LEFT JOIN and LEFT OUTER JOIN in SQL Server.

Description:

In previous posts I explained many articles relating to SQL Server. Now I will explain the difference between left join and left outer join in SQL Server.

Actually this one is very simple question but many of beginners are asking the same question that’s why I decided to write an article on it. Basically there is no difference between LEFT JOIN and LEFT OUTER JOIN both are same. Whenever we use LEFT JOIN keyword in SQL Server that is the LEFT OUTER JOIN only  

Difference between Left Join,Right Join,Cross Join,Inner Join,Full Outer Join,Self Join in SQL Server

3 comments
Introduction:

Here I will explain the differences between Left Join, Right Join, Cross Join, Inner Join, Self Join, Full Outer Joins in SQL Server.

Description:

In previous posts I explained many articles relating to SQL Server. Now I will explain the differences between Left Join, Right Join, Cross Join, Inner Join, Self Join, Full Outer Joins in SQL Server. To know about the difference between all the joins check this article

Difference Between LEN and DATALENGTH Functions in SQL Server

Sep 19, 2012 3 comments
Introduction:

In this article I will explain differences between Len() and DataLength() functions in sql server.

Description:

In previous post I explained differences between char, varchar and nvarchar, difference between tinyint,smallint,int,bigint and many articles relating to SQL Server. Now I will explain differences between Len() and DataLength() functions in SQL Server.

How to Convert Rows to Columns in SQL Server Without Using Pivot

Sep 15, 2012 13 comments
Introduction:

Here I will explain how to convert row values to column values without using pivot in SQL Server.

Description:

In previous articles I explained Query to get duplicate records count, Query to remove duplicate records and many articles relating to SQL Server. Now I will explain how to write a query to convert row values to column values without pivot in SQL Server. In database I have one table UserInformation that contain data like as shown below

SQL String or Binary Data Would be Truncated. The Statement has been Terminated

Sep 7, 2012 15 comments
Introduction: 

Here I will explain how to solve the problem of “string or binary data would be truncated. The statement has been terminated.” in sql server. 

Description:

One day I am trying to insert data into one table using SQL queries at that time I got error like “String or binary data would be truncated. The statement has been terminated.” Actually this problem because of I declared column datatype varchar(25) but I am inserting data more than 25 characters in that column. To solve this problem I modified column datatype varcha (25) to varchar(50)

SQL Server - Query to Get Data between Two Dates in SQL Server

Aug 11, 2012 23 comments
Introduction:

Here I will explain how to write a SQL query to get data between two dates in SQL Server.

Description:

In previous articles I explained many articles relating to SQL Server. Now I will explain how to write a query to get data between two dates in SQL Server. In database I have one table UserInformation that contain data like as shown below

use top clause with update delete statements in SQL Server

Aug 7, 2012 0 comments
Introduction:

Here I will explain how to use top clause or keyword with update and delete statements in SQL Server.

Description:

In previous post I explained use top clause with insert statement in SQL Server and many more articles relating to SQL Server. Now I will explain how to use top clause with update and delete statements in SQL Server.

Before write query to use top keyword or clause with update and delete statements we need to design table UserInformation in database like as shown below

SQL Server - Query to use Top Keyword Clause with Insert Statement in SQL Server

3 comments
Introduction:

Here I will explain how to write SQL query to use top keyword or clause with with insert statement in SQL Server.

Description:

In previous post I explained use distinct keyword with top statement, Replace function example and Substring function example in SQL Server and many more articles relating to SQL Server. Now I will explain how to use top clause or keyword with insert statement in SQL Server.

how to return value from stored procedure in sql server

Jul 31, 2012 1 comments
Introduction:

In this article I will explain how to create a stored procedure to return value in SQL server.

Description:

In previous post I explained Create stored procedure to return multiple values in SQL Server and many articles relating to SQL Server. Now I will explain how to create a stored procedure to return value in SQL Server. If you want to know how stored procedure return value in sql server check below post in that post explained clearly how stored procedure will return single or multiple values in SQL Server.

how to return multiple values from stored procedure in sql server

13 comments
Introduction:

In this article I will explain how to create a stored procedure to return value or multiple values in SQL server.

Description:

In previous post I explained how to write stored procedure to return output parameter values in sql server and many articles relating to SQL Server. Now I will explain how to create a stored procedure to return values in SQL Server. To implement this concept first design table in database and give name as UserDetails as shown below

Difference between char varchar and nvarchar in sql server

Jul 22, 2012 32 comments
Introduction:

In this article I will explain what is the difference between char, varchar and nvarchar in SQL Server.

Description:

In previous post I explained many articles relating to SQL Server. Now I will explain the differences between char, varchar and nvarchar in SQL Server. Actually one of blog reader has asked me question regarding differences between varchar and nvarchar at that time I decided it’s better to write article on this topic.

Char DataType

Char datatype which is used to store fixed length of characters. Suppose if we declared char(50) it will allocates memory for 50 characters. Once we declare char(50) and insert only 10 characters of word then only 10 characters of memory will be used and other 40 characters of memory will be wasted.
© 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.