show-notice
hide-notice
Showing posts with label SqlServer. Show all posts
Showing posts with label SqlServer. Show all posts

Wednesday, 21 August 2013

Select Record from database randomly based on time in sql server

0 comments
Introduction:

Here i will explain Select Record from database randomly based on time in sql server

Description:

Previous article i will explain Transform multiple row values to 1 row values in sql server. now i will explain Select Record from database randomly based on time in sql server.

Transform multiple row values to 1 row values in sql server

0 comments
Introduction:

Here i will explain  Transform multiple row values to 1 row values in sql server.

Description:

previous article i will explain Sql Function. Now today i will explain  the most of difficult query in sql server is Transform multiple row values to 1 row values in sql server.

Saturday, 10 August 2013

COALESCE Function In Sql Server

0 comments
Introduction:

During Development we have use more time Colesce method If someone have home address or office address suppose if you dispaly available first record means you can use coalesce method or concatinate columns we use this coding

Tuesday, 6 August 2013

Delete duplicate record in sql server

0 comments
Introduction

Most of the times, we use primary key or unique key for preventing insertion of duplicate rows in SQL Server. But if we don't use these keys, then it's obvious that duplicate rows could be entered by the user. After inserting duplicate rows into table, it becomes a major issue to delete those duplicate rows. In that time, we need to delete those duplicate rows to resolve the issue. So this topic will help us to delete those duplicate rows from the specific table.

FORMAT() Function in Sql Server

0 comments
Introduction:
The FORMAT() function is used to format how a field is to be displayed.

NOW() Function in Sql Server

0 comments
Introduction:

The NOW() function returns the current system date and time.

ROUND() Function in Sql Server

0 comments
Introduction:

The ROUND() function is used to round a numeric field to the number of decimals specified.

LEN() Function in Sql Server

0 comments
Introduction:

The LEN() function returns the length of the value in a text field.

MID() Function in sql server

0 comments
Introduction:

The MID() function is used to extract characters from a text field.

LCASE() Function in sql server

0 comments
Introduction:

The LCASE() function converts the value of a field to lowercase.

UCASE() Function in sql server

0 comments
Introduction:

The UCASE() function converts the value of a field to uppercase.

SUM() Function in sql server

0 comments
Introduction:

The SUM() function returns the total sum of a numeric column.

MIN() Function in sql server

0 comments
Introduction:

The MIN() function returns the smallest value of the selected column.

MAX() Function in sql server

0 comments
Introduction:

The MAX() function returns the largest value of the selected column.

Sysntax:
SELECT MAX(column_name) FROM table_name;


Example
SELECT MAX(Price) AS HighestPrice FROM table; 

Last() Function in sql server

0 comments
Introduction:

The LAST() function returns the last value of the selected column.

How to Use the RANK Function in sql server

0 comments
Introduction:

Sometimes you want a row that has the same order by column value as another row to have the same ranking.  If this is the case then the RANK() function will help you.  The RANK function has the following calling syntax:

First() Function

0 comments
Introduction:

Returns the first value of the specified expression.

Count() Function

0 comments
Introduction:

The count function returns the number of rows which are currently in existence.It is used when number of rows in the collection are unknown. This Count function oftenly used when you have large tables, or you expect a large output means you want to count total number of rows with you search condition like in where clause. In such situations, it is desirable to determine the number of rows of output that you will be getting before actually displaying the output. In this section, we introduce the COUNT function and we also take another look at the concept of null values.

AVG() Function

0 comments
Introduction:

The avg function in sql server provide the mathematical average of a series of values. In other words we can say that The AVG function calculates the arithmetic mean (the sum of non null values divided by the number of non null values) of a set of values contained in a numeric column (or attribute) in the result set of a query.

Tuesday, 30 July 2013

Calculate Running Total, Total of a Column and Row in sql server

0 comments
Introduction

Many times, you required to show information of each transaction and also keep a Running Total and Final Total like GridView in Asp.Net. In this article, I am going to explain, how can you achieve this using SQL Query in simple and easy way.
Design by Gohilinfotech | www.gohilinfotech.blogspot.com