.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

What is the meaning of Ascending\descending sort order of a column within an index

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :Sql Server
When I add a new index I can also specify the "sort order" as ascending or descending. What does it mean? does it affect performance? does it mean that the binary search tree will be set in a certain way?

View Complete Post

More Related Resource Links

In RB 2.0 how to sort in ascending/descending order as default?

I have column say of Provider Type which I want to be ordered when report is run so that all other columns are ordered according to the order of the Provider Type values.

WPF: how to make a GridView only sort on one column as ascending order?


We use GridView inside the Listview. We need the grid view alwasy sort on one column ascending order and not allow to click column header to change it.

Is there a easy way to achieve it in Xaml?

If not possible, how to achieve it in code behind?



coalesce building pivot column headers - making them descending instead of ascending


Hi, I was somewhat surprised and happy to see that the t-sql statement below can be used to dynamically build my pivot column headers.   I was also surprised to see that either it is smart enought to build the headers alphabetically or I'm incredibly lucky.  Date is a char(7) column in my table with format yyyy/mm.

Anyway, it would be really cool for me if the headers were build descending instead of ascending.  I tried using a view to do this but the thing has a mind of its own.  I'll start writing a function but would like to know if the community knows of a better way. 

It generates a string that looks something like ...




@PivotColumnHeaders VARCHAR

Web Q&A: ASP.NET Performance, Notification, Keeping Sort Order, and More


Edited by Nancy Michell

MSDN Magazine May 2005

how to create index for a column


Hi Friends,

                       I need to create the index for a column and accessing that in sqlserver 2005. Please any one help me.


Order by Nemeric column


Hi all,

Thank you for advance.

the Document Rank column is numeric and contain the values are 2,1,0,4,0,5,3,0,6

we need to get the document rank with the following orders

how can i do this?

listView Sort for a celltmplate column

hi , i have a list view with a column that is binded to a field in my database the field contains integers that represents the City_ID , and i a have another table that contains the cities and their ID's, so , when i apply the sort based on this column (City Column) the list View is sorted based on the integers not on the city names here is my XAML definition of that column : GridViewColumn Header="City_Name_ID" Width="75">                         <GridViewColumn.CellTemplate>                             <DataTemplate>                                 <ComboBox IsSynchronizedWithCurrentItem="False" ItemsSource="{Binding Source={StaticResource CitysViewSource}}" SelectedValue="{Binding Path=City_Name_ID}" SelectedValuePath="City_ID" DisplayMemberPath="City_Name"/>                      &nb

SSIS Changing Column Order during Transformation

First let me say, I really can't believe this chain of events myself--and they are happening to me. I am upgrading several DTS packages to SSIS on what will be my new production server.  These packages create tables, export them to a flat file, and ftp them off to other locations. What is happening (on the SSIS side) is that the OLE DB Source is reordering some of the columns on its own (moving them to the end of the table/file.  Then when my pickup/load routines run, the data is out of place and they fail. Can anyone please explain what is happening here with the mapping.  I have evaluated the table and the columns are in the order that I expect.  When I preview the source table in the OLE DB Source Editor the columns are in the correct order/alignment, but when them in the OLE DB Source Editor --Columns section within BIDS the order is changed arbitrarily. I have been somewhat successful (2 out of 3) in being able to re-map the data, but this last table just doesn't want to change.  Thanks in advance for any help and/or information you can provide

Looking for TSQL statement that returns customers with greatest number of order in descending order

What would be an efficient TSQL SELECT statement that joins customer and order tables, counts the orders for each customer (group by) and returns a result for all customers with at least one order, and also in descending order from customers with the most orders to the least?

How do I change the order of column names in EditForm.aspx

I have an Announcements list to which I've added extra columns: Publish (date), De-Publish (date), and Category (choice).  When I go to EditForm.aspx, the columns display in this order: Title , Body, De-Publish , Category and Publish . I'd like to change the order of the columns on EditForm.aspx so that it is Title, Body, Category, Publish and De-Publish . Changing the All Items view doesn't do it. How might I change the order of columns that is shown to the user?

How do I INSERT when I don't know the column order

If I know the order that columns are in (FirstName, LastName, PetName), inserting into a table is easy: INSERT INTO MY_TABLE ("Charlie", "Brown", "Snoopy") But if I only know the column names and not their order, how do I insert?

How to save and restore column order in WPF?

Hi, I am working on WPF 4 DataGrid, and I was just wondering if there is a way to save column order to xml at application shutdown and restore column order at application startup. I am thinking of to create a class with properties like header name, display index and visibility, but i don't know how to map this to datagrid columns.

Reorganize index order

Hi experts, If a table has mulptiple indexes (cluster and NCluster index), which index should be reorganized first? I know if you want to rebuild index, you want to start with Cluster index and then do the rest (NC index) Regards

Dynamic Data Entity Framework: Initial Sort Order for Views

Hello Steve,I'm trying to set an initial sort order for my View (not table) in Dynamic Data using Entity Framework 2. I have updated my Model and Imported the View. Now I'm trying to use the DisplayColumn attibutebut it's not working.[DisplayColumn("Product", "ParsingOrder", true)]Fabio

Sort a WPF DataGrid on a Customized Column

I have several wpf DataGrids that use something similar to: {     Binding Path=ContactID, Converter={StaticResource contactIDToNameConverter}}"       As a best concept for various ID fields in my database.  This is great when needing to display editable data that is linked by ID, and my converter handles the validation and cleanup if needed. Otherwise an SQL View, or Joined Table SQL would not be able to send updates directly to the database (DataSet Wizard).  For this DataGrid's Contact column (bound to the ContactID field from a ICollectionView; bound to a DataSet.ClientsToContacts DataTable), I have an underlying value of Integer, and a converted surface value of String.  I want to sort on the string. Using ICollectionView.View.SortDescription(path,direction) will only sort on the Integer, and I am desprately seeking work arounds.  Please help. jvj

Dundas Map - Legend sort order

ello, We are using Dundas Maps together with Reporting Services 2008. Now we have come across a problem which we are not able to solve ourselves.   We produce a map showing each countries “ReportingFormat”. The SQL in the background  has the “order by ReportFormat” clause.   The values available in “ReportFormat” are shown in the legend. So far everything looks fine and the values within the legend are ordered correctly (E2B, Intdis, Not specified). See the picture http://img340.imageshack.us/i/correctorderfrompreview.jpg/   We therefore deploy the report and open it up in Internet Explorer but now the order of the legend has changed and is shown as (Intdis, Not specified, E2B). See the picture http://img816.imageshack.us/i/incorrectorderfromie.jpg/   We have tried to set the sorting also within the map (not only within the SQL) but the same problem remained although we are not sure we set that sorting correctly . We are not sure that we found the series collection where we could set the sort order. It is all a bit confusing when working with the maps.   As a final solution we tried to change the available values in “ReportFormat” but then the order was even more confusing. See table below; Available values (ReportFormat) Order in legend in Visual studio preview Order in legend in Internet

How to create nonclustered index which uses function on column?

Hi, Is there any way I can perform following. The ID column is of varchar type.   CREATE NONCLUSTERED INDEX idxID ON Table_1(CAST(ID AS BIGINT) );   Regards, Jigs
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend