I'm working on a simple SQL View which has a field called DispatchNote of type varchar. Here is what I needed to do: Filter this view so that we only have rows in which the value of DispatchNote is convertible to int. Afterwords, I need to query this view again and filter it using a between clause, like so:
SELECT *
FROM ViewDispatchNotes
WHERE DispatchNote >= @value1 AND DispatchNote <= @value2
value1 and value2 are both string values.
if I wanted to do this in linq, how could I achieve it? (or a lambda expression)