I have a SQL table with a field type set as varchar. Obviously this field can therefore contain either text or numbers. When retrieving data from the table I need to be able to determine if all the filtered results are numeric or whether there are alpha characters included too. I need to do this so that when a sort is carried out on the results it will sort in an appropriate way e.g. if the results are numeric the sort should result in 1,4,17 rather than 1,17,4.
If the results are numeric I can then use:
Convert(int,tblEntryValue.EntryValue)
ORDER BY tblEntryValue.EntryValue
How can I determine what data types are in my filtered record set?
If the results are numeric I can then use:
Convert(int,tblEntryValue.EntryValue)
ORDER BY tblEntryValue.EntryValue
How can I determine what data types are in my filtered record set?