mel150
asked on
use the convert function to run this query
Hi,
I am a beginner, so be very simplistic with me, ok?
I am trying to run this query:
update orders
set subtotal='59'
where id=47
And I get this:
disallowed implicit conversion from data type varchar to data type money. use the convert function to run this query.
how do I do this? thanks!
I am a beginner, so be very simplistic with me, ok?
I am trying to run this query:
update orders
set subtotal='59'
where id=47
And I get this:
disallowed implicit conversion from data type varchar to data type money. use the convert function to run this query.
how do I do this? thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks very much!! I didn't try the first one, but the second one worked!! Thanks so much!
glad i could help, but i should thank you for pushing me over to the SQL Server master level ;-)
ASKER
Congratulations! Glad I could be of service. :)
if the datatype of the column subtotal is numeric you don't need to use the quotes
try
update orders
set subtotal=59
where id=47
hope this helps a bit
bruintje