Answered
sql: convert data type from varchar to money (asp, vb, sql)
Hi,
I'm trying to do a simple search form that takes a value for a max imum price from a text-field in a form, which is then passed to a catalogue page. On this page I have a select query that includes a where condition for price less than the value of the query string.
A simplified version of the query is:
"SELECT * from table where price < 'varPrice' "
When I run this I get an error saying
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Implicit conversion from data type money to varchar is not allowed. Use the CONVERT function to run this query.
I've googled this a fair bit and can't really find what I need to get me started - anyone able to point me in the right direction?
Thank you very much,
I'm trying to do a simple search form that takes a value for a max imum price from a text-field in a form, which is then passed to a catalogue page. On this page I have a select query that includes a where condition for price less than the value of the query string.
A simplified version of the query is:
"SELECT * from table where price < 'varPrice' "
When I run this I get an error saying
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Implicit conversion from data type money to varchar is not allowed. Use the CONVERT function to run this query.
I've googled this a fair bit and can't really find what I need to get me started - anyone able to point me in the right direction?
Thank you very much,
