开发者

Need help Sql Asp.net C# [closed]

开发者 https://www.devze.com 2023-04-02 02:55 出处:网络
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necess
Closed. This question needs debugging details. It is not currently accepting answers.

Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.

Closed 6 years ago.

Improve this question 开发者_运维百科

I have a table with a lot of data. I already have a filter on the identity column descending and the data are filtered with two labels. But this is less important, it is important that now I need a solution to the field FIFTH, and when data in FIFTH is "this one" need to that row be on top. Is there a way to programmed that?

Maybe in Page_Load, GridView1_DataBound or GridView1_DataBinding?

example see picture:

Image 1 http://hamachinetwork.info/x.jpg


select * 
from table
order by 
   case when fifth = 'this one' then 0 else 1 end, 
   firstId DESC
0

精彩评论

暂无评论...
验证码 换一张
取 消