Search

  • In search will it be possible to order the items like this?

    I am having a column "Description".If i give the search letter as 'B' The description column should list the descriptions starting with B first and then the rest.

     

  • This will do what you want:

    Declare @Letter char;
    Set @Letter = 'B';
    
    Select  Description
    From    TheTable
    Where   Left(Description, 1) >= @Letter
    Order By Description;
    

    However, it's going to be a performance pig and there's not really a lot that can be done about it.

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

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

You must be logged in to reply to this topic. Login to reply