Click here to Skip to main content
15,887,776 members
Home / Discussions / C#
   

C#

 
AnswerRe: Ordering names into list box Pin
OriginalGriff25-Mar-18 21:44
mveOriginalGriff25-Mar-18 21:44 
GeneralRe: Ordering names into list box Pin
#realJSOP26-Mar-18 2:06
mve#realJSOP26-Mar-18 2:06 
GeneralRe: Ordering names into list box Pin
OriginalGriff26-Mar-18 2:13
mveOriginalGriff26-Mar-18 2:13 
GeneralRe: Ordering names into list box Pin
Member 1374647826-Mar-18 2:52
Member 1374647826-Mar-18 2:52 
GeneralRe: Ordering names into list box Pin
OriginalGriff26-Mar-18 3:57
mveOriginalGriff26-Mar-18 3:57 
GeneralRe: Ordering names into list box Pin
#realJSOP26-Mar-18 5:27
mve#realJSOP26-Mar-18 5:27 
QuestionMin and Max or Range Pin
sunsher21-Mar-18 22:52
sunsher21-Mar-18 22:52 
AnswerRe: Min and Max or Range Pin
OriginalGriff21-Mar-18 23:04
mveOriginalGriff21-Mar-18 23:04 
sunsher wrote:
Is it possible to do so, as the UId is varchar.

Yes, but ... it's frankly pretty nasty, and going to make for a complicated query.
If you want data that you can treat as numeric - and you will need to use it for numerics at some point, or your sort order will be completely wrong - I'd strongly suggest that you change the column, and split it into two parts: a numeric prefix, and an alphabetic suffix. That way, you can ignore your suffix when trying to work with numbers, and combine the columns to a strign when you want to work with the "original value".
Then it's trivial:
SQL
SELECT MIN(numericBit), MAX(numericBit), Class
FROM MyTable
GROUP BY Class
But trying to do that with string based data that may contain alphabetic suffixes? Nasty, nasty code.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

AnswerRe: Min and Max or Range Pin
Gerry Schmitz22-Mar-18 9:00
mveGerry Schmitz22-Mar-18 9:00 
AnswerRe: Min and Max or Range Pin
Eddy Vluggen22-Mar-18 10:24
professionalEddy Vluggen22-Mar-18 10:24 
AnswerRe: Min and Max or Range Pin
#realJSOP23-Mar-18 2:37
mve#realJSOP23-Mar-18 2:37 
SuggestionRe: Min and Max or Range Pin
Richard Deeming23-Mar-18 9:19
mveRichard Deeming23-Mar-18 9:19 
GeneralRe: Min and Max or Range Pin
sunsher24-Mar-18 0:38
sunsher24-Mar-18 0:38 
GeneralRe: Min and Max or Range Pin
#realJSOP24-Mar-18 1:00
mve#realJSOP24-Mar-18 1:00 
GeneralRe: Min and Max or Range Pin
Eddy Vluggen24-Mar-18 1:05
professionalEddy Vluggen24-Mar-18 1:05 
GeneralRe: Min and Max or Range Pin
#realJSOP24-Mar-18 1:00
mve#realJSOP24-Mar-18 1:00 
GeneralRe: Min and Max or Range Pin
jsc4228-Mar-18 3:02
professionaljsc4228-Mar-18 3:02 
JokeRe: Min and Max or Range Pin
Mycroft Holmes24-Mar-18 13:14
professionalMycroft Holmes24-Mar-18 13:14 
GeneralRe: Min and Max or Range Pin
#realJSOP26-Mar-18 2:10
mve#realJSOP26-Mar-18 2:10 
AnswerRe: Min and Max or Range Pin
MadMyche26-Mar-18 6:26
professionalMadMyche26-Mar-18 6:26 
Questionasync using linq Pin
Member 1347859921-Mar-18 20:42
Member 1347859921-Mar-18 20:42 
AnswerRe: async using linq Pin
Pete O'Hanlon21-Mar-18 22:01
mvePete O'Hanlon21-Mar-18 22:01 
GeneralRe: async using linq Pin
Member 1347859921-Mar-18 22:07
Member 1347859921-Mar-18 22:07 
GeneralRe: async using linq Pin
Pete O'Hanlon21-Mar-18 23:14
mvePete O'Hanlon21-Mar-18 23:14 
GeneralRe: async using linq Pin
Member 1347859922-Mar-18 1:04
Member 1347859922-Mar-18 1:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.