Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Data type--Money

Author  Topic 

Ton9
Starting Member

14 Posts

Posted - 2001-04-24 : 12:35:53
I have a stored proc(look below) that I am passing as one of the values "&price&". when I try to display the page I get an error that says:
Implicit conversion from data type varchar to money is not allowed. Use the CONVERT function to run this query.

I am a little unsure of where to use the CONVERT function, and why it says from a varchar. In my DB it is also declared as money. Any advice would be very appreciated!!!

CREATE Procedure Listing_insert
(
@county varchar (25),
@city varchar (25) ,
@price money,
@bedrooms varchar (8) ,
@bathrooms varchar (8) ,
@garagesize varchar (8) ,
@typeofprop varchar (8) ,
@intsize varchar (8) ,
@waterfront varchar (10) ,
@hasView varchar (10) ,
@acres varchar (10)
)
As
DECLARE @newpropertyID int
INSERT INTO bw.List (city, price, bedrooms, bathrooms, garagesize, typeofprop, intsize, hasView, waterfront, acres)

VALUES ( @city, @price, @bedrooms, @bathrooms, @garagesize, @typeofprop, @intsize, @hasView, @waterfront, @acres)
Set @newpropertyID =( SELECT MAX(propertyID) FROM bw.List)

return


   

- Advertisement -