Click here to Skip to main content
15,742,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Incorrect syntax near the keyword 'convert'.


SQL
ALTER Procedure [dbo].[buson_getEMPLOYEEIDNAME_s]
(
    @Month INT,
    @Year INT
)
As
Begin
 Select EmpId,Name,(BUSON_SALARYSTR.BASICSALARY / dbo.GetNoofDaysPerMonth(@Month, @Year)) *
 (dbo.GetNoofDaysPerMonth(@Month, @Year) - dbo.NoofdaysAbsent(EmpId,@Month,@Year))(convert(decimal, '12343.5787') as BASICSALARY ,BUSON_SALARYSTR.CODE  FROM BUSON_EMP
 INNER JOIN BUSON_SALARYSTR ON BUSON_SALARYSTR.CODE = BUSON_EMP.SalaryStructure
End
Posted
Updated 6-Mar-13 22:05pm
v2

Shouldn't there be a comma in there?
SQL
Select EmpId,Name,(BUSON_SALARYSTR.BASICSALARY / dbo.GetNoofDaysPerMonth(@Month, @Year)) *
(dbo.GetNoofDaysPerMonth(@Month, @Year) - dbo.NoofdaysAbsent(EmpId,@Month,@Year))(convert(decimal, '12343.5787') as BASICSALARY ,BUSON_SALARYSTR.CODE  FROM BUSON_EMP
INNER JOIN BUSON_SALARYSTR ON BUSON_SALARYSTR.CODE = BUSON_EMP.SalaryStructure


SQL
Select EmpId,Name,(...) * (...)(convert(decimal, '12343.5787') as ...
-------------------------------^
 
Share this answer
 
Comments
Maciej Los 7-Mar-13 4:13am    
Wow! Good eye (we say in Polnad, but i don't know equivalent phrase in english).
+5
OriginalGriff 7-Mar-13 4:18am    
First thing I look for: mismatched brackets! :laugh:
Try this:
SQL
CONVERT(DECIMAL(18,2),'123456.789')


More about CONVERT[^] function.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900