id name
1 NA
2 jay
3 pole
how to do that name in alphabetical order and i don't wanna change that constant name in 'NA'
without NA how to Order By using
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Hanook159 reputationPosted Oct 30, 2013, 9:23 PM EDT
SELECT id, name
FROM TableName
ORDER BY CASE WHEN name = 'NA' THEN CAST(1 AS VARCHAR) ELSE name END
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Oct 30, 2013, 8:29 PM EDT
just use asc or desc in your select query then bind it to combo box.
Note: as NA is the default don't take it from database. after binding the data to combobox just insert the NA in index possition 0.
Safeer Safeer171 reputationPosted Oct 30, 2013, 9:08 PM EDT
can u explain that sql query
Safeer Safeer171 reputationPosted Oct 30, 2013, 9:29 PM EDT
Hanook159 reputationPosted Oct 30, 2013, 9:50 PM EDT
Safeer Safeer171 reputationPosted Oct 30, 2013, 10:47 PM EDT