I am getting tthe following error: when i run the select queryServer: Msg 170, Level 15, State 1, Line 15Line 15: Incorrect syntax near ','.I am doing concatenation of lot of fields to body. and using that for sending email.Please if you can tell me what am i doi g wrong at line15.Select rcp.Email, getdate(), 'Title: ' + rtrim((m.rmtitle) + char(13) +'Document Date: ' + rtrim(isnull(CONVERT(varchar(10),m.DocumentDate,101),'')) + char(13) + 'Recv Date: ' + rtrim(isnull(CONVERT(varchar(10),m.ReceivedDate,101),'')) + char(13) + 'From: ' + rtrim(m.OrigSender)+ char(13) + 'Organization: ' + m.OrigOrganization + char(13)+ 'To: ' +dbo.ccsFunctionRecipientTO(29,'RM') + char(13)+ 'DistributionDate: ' + rtrim(isnull(CONVERT(varchar(10),rcp.sentdate,101),'')) + char(13) + char(13)+ 'Module: ' + rtrim((rcp.MODULENAME) + char(13) + 'Program: ' + pg.progno + ' - '+ pg.progname + char(13) + 'Project: ' + pj.projno + ' - ' + pj.projname + char(13) + 'Contract: ' + ct.contractno + ' - ' + ct.contractname + char(13) + 'Log: ' + rtrim((ltype.englishtext) + char(13) + 'Sequence: ' + rtrim(isnull(m.SequenceNO,'')) + char(13)+char(13) + 'Created/Modified By: ' + rtrim(isnull(m.UpdatedBy,'')) + char(13) as body,'You have been assigned distributed a document on CCSNet: Invoice '+ m.rmtitle from TAB_ccsNetRecipients rcp, TAB_ccsNetRM m, tab_ccsnetprograms pg, tab_ccsnetprojects pj,tab_ccsnetcontracts ct , TAB_ccsNetPickLists ltype where rcp.ModuleRecordID = m.RMID andm.logtype = ltype.pickid and ltype.fieldlabelkey = 'lblLogType' andm.progid = pg.progid and m.projid = pj.projid andm.contractid = ct.contractid and rcp.ModuleName = 'RM' and rcp.MODULERECORDID =29
Thank you very much for the information.