Not sure if anyone can help but I've got a situation where I need to obtain the next available value from a table, from a field which is a varchar(3).
The format of this field is 'NAA' - i.e. first char is a numeric, and the next two chars are alphanumeric. So typical values will look like follows:
Is there any way I can produce a query that will recognise any 'gaps' within the sequences so that I obtain as next value - e.g. getting say '068' or '0AC' from the above?
btw. this field is part of a composite key - thje other value being another varchar(3)