I perform a select statement, and when I put the value into @Number_of_Transactions it is a varchar(50).
Since it is going into a new table with a Money datatype, I convert it, but I am getting two errors, one saying:
Server: Msg 257, Level 16, State 3, Procedure createspend, Line 29
Implicit conversion from data type money to varchar is not allowed. Use the CONVERT function to run this query.
and the other saying:
Server: Msg 260, Level 16, State 1, Procedure createspend, Line 31
Disallowed implicit conversion from data type varchar to data type money, table 'ITPSG.dbo.CCSPENDREPORTTEST', column 'TOTAL'. Use the CONVERT function to run this query.
Below is the code...what am I missing?
FETCH NEXT FROM cursor2
INTO @NAME, @AWID, @Total_Amount, @Number_of_Transactions, @Industry, @Costctr