Integer field not sorting as integer but rather as string
Hi,
I have the following column in a SQL view:
ROW_NUMBER() OVER (PARTITION BY VM.VENDORID ORDER BY VM.VENDORID,P.DOCDATE,p.DEX_ROW_ID) Line,
When I click on the header in smartview to sort the column, it sorts like a string 1, 10,11….2.
I tried converting to int but that didn’t help.
CONVERT(INT, ROW_NUMBER() OVER (PARTITION BY VM.VENDORID ORDER BY VM.VENDORID,P.DOCDATE,p.DEX_ROW_ID)) Line,