Skip to content
Advertisement

How do you return the max of a column (Text field)? [closed]

I can not find a way to execute the following simple query:

SELECT max(@SomeCol) FROM test_table;

I can do just about everything else except for that, max doesn’t return what I expect.

Advertisement

Answer

You may be able to workaround the issue by loading the dB query/table into a .Net DataTable and use it’s Compute method:

DataTable.Compute("AggregateFunction(DataColumn)", "condition|Nothing|null")
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement