I'm creating a smart list for better viewing of reports.
My problem is when im generating the query below, it fails with this error message "Conversion failed when converting the varchar value 'Field2' to data type int."
This my query
SELECT * FROM (SELECT *, ROW_NUMBER() OVER (ORDER BY [SECCODE]) AS RowNumber
FROM myDB.mySchema.myView
WHERE [Field1]<[Field2]) tempTable WHERE [tempTable].[RowNumber]>=1 AND [tempTable].[RowNumber]<=100
The Field2 is from a textbox. I try to put the exact field name but I still get the error.
Please help. Thanks in advance.