Numeric expressions against nvarchar(50)

Neal

Forum Admin
Staff member
Joined
Jun 2, 2004
Messages
123
Location
VA
Programming Experience
10+
Hello,

I'm developing an application against a database not in my control, I can only query against the structure. A column exists that holds order numbers, but the developers used nvarchar(50) for the column instead of int.

I'd like to use expressions to search for order numbers such as <, >, <=, >= etc. All seems to work fine EXCEPT <. For some reason, this throws an error in my app.

Is it possible to build a SQL query against a nvarchar(50) that treats it like an int, allowing numeric expressions?
 
Top Bottom