Unanswered: SQL2K - converting data type varchar to numeric Error
I have always programmed my ASP pages with MS Access DB's and we recently got a SQL Server 2000. So, I'm totally new to SQL Server 2000.
I trying to retrieve data from a table in SQL, based on values from two input fields (text fields) on a form in the web page.
To process the form, I am using the following syntax:
Set oRs = oConn.Execute("SELECT BBILNAM, BTWP, BTXP, BPARCEL, BBILADD, BBILCTYST, BBILZIP5 FROM TESTdb WHERE BTWP = 'TWP' AND BPARCEL = 'PARCEL'")
SQL Fields in Table TESTdb are (BTWP = numeric field) and (BPARCEL = text field)
I realize that the problem is that I'm comparing a numeric field in my table, to a text field from my form, but don't know how to convert the text field to a numeric field, prior to the execution of the select statement. I'm hoping someone can point me in the right direction. Thanks!