Solved

Incorrect Syntax

Posted on 2011-02-21
2
351 Views
Last Modified: 2012-06-22
Getting an "Incorrect syntax near '+' on the following SQL


exec portal.dbo.sp_portal_SendNotificationEmail @ToAddr ='lrbrister@mycompany.com',@copy_recipients = '',@Bcc = ''
,@Subject = @dealid, @Body ='Cleared Structured AFS for DealID:' + Cast(@dealID as varchar(4)) + ''

Open in new window

0
Comment
Question by:lrbrister
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 34943358
you cannot build parameter values during calling a procl
declare @body varchar(max)
set @body = 'Cleared Structured AFS for DealID:' + Cast(@dealID as varchar(4)) + ''
exec portal.dbo.sp_portal_SendNotificationEmail @ToAddr ='lrbrister@mycompany.com',@copy_recipients = '',@Bcc = ''
,@Subject = @dealid, @Body = @body

Open in new window

0
 

Author Closing Comment

by:lrbrister
ID: 34943396
man!  I knew that!

Just going too fast...thanks
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question