sql - Stored Procedure Parameters -> error converting data type nvarchar to money -


i stuck error @ stored procedure. i've searched , tried different stuff, solutions didn't fix it.

i want check if salary of employees between 2 different values , don't cross minimum or maximum value.

i use trigger fires on insert , update , gets following data , uses data execute stored procedure.

1 - job_id (int datatype) 1000.00 - salaris (money datatype) 13 - employee_id (int datatype) 3000.00 - min_salary (money datatype) 7000.00 - max_salary (money datatype) 

calling of stored procedure:

exec sp_salary_check salary, emp_id, job_number, min_salary, max_salary, '' (output) 

parameters of stored procedure:

(@new_salary money , @emp_id integer, @job_number integer, @min_salary money, @max_salary money, @msg varchar(50) output) 

if insert employee break on parameters of stored procedure. receive error: error converting data type nvarcharto money. indicated attribute @new_salary.

if change nvarchar works perfectly. if change datatype money nvarchar receive same error integer instead of money.

does have clue on this?

insert statement:

use [outdoor_paradise] go  insert [dbo].[employee]            ([ss_number]            ,[salary]            ,[start_date]            ,[termination_date]            ,[first_name]            ,[last_name]            ,[work_phone]            ,[extension]            ,[fax]            ,[email]            ,[sales_branch_code]            ,[job_number]            ,[manager_id]            ,[dept_id]            ,[emp_details_id])      values            (12345            ,1500            ,'2000-12-12'            ,null            ,'foo'            ,'bar'            ,'12345'            ,'1000'            ,'fax?'            ,'foo@bar.nl'            ,1            ,1            ,null            ,null            ,1) go 


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -