Vissu
Vissu

Reputation: 2043

SQL : Stored procedure execution error

In my stored procedure I am getting the following error

'price=ROUND(' CONVERT(VARCHAR, changeValue) + '/(1.00- marginPercent), 2) ' + sqlWhere

Error is:

Incorrect syntax near the keyword 'CONVERT'.

I have not found any syntax error. Please help me on this. I'm using SQL Server 2000

Upvotes: 1

Views: 652

Answers (3)

Yogesh Bhadauirya
Yogesh Bhadauirya

Reputation: 1235

you have syntax error in query,

correct the syntax error check below one & compare with your query


'price=ROUND('+ CONVERT(VARCHAR, changeValue) + '/(1.00- marginPercent), 2) ' + sqlWhere

look into

ROUND('+ CONVERT(VARCHAR, changeValue) 

Upvotes: 1

Stuti
Stuti

Reputation: 1638

Have you given correct value at VARCHAR

'price=ROUND(' CONVERT(VARCHAR, changeValue)??

I think there is an error. You have not given the value.

Upvotes: 0

Alex Aza
Alex Aza

Reputation: 78467

Seems like you are missing + between price=ROUND( and CONVERT(VARCHAR, changeValue)

Upvotes: 1

Related Questions