Click here to Skip to main content
16,005,038 members
Home / Discussions / Database
   

Database

 
GeneralRe: Get Count Of Duplicate Records Using A Loop Pin
rowdykuttan15-Sep-09 8:40
rowdykuttan15-Sep-09 8:40 
GeneralRe: Get Count Of Duplicate Records Using A Loop Pin
Tim Carmichael15-Sep-09 8:53
Tim Carmichael15-Sep-09 8:53 
GeneralRe: Get Count Of Duplicate Records Using A Loop Pin
rowdykuttan15-Sep-09 9:11
rowdykuttan15-Sep-09 9:11 
GeneralRe: Get Count Of Duplicate Records Using A Loop Pin
Tim Carmichael15-Sep-09 9:20
Tim Carmichael15-Sep-09 9:20 
GeneralRe: Get Count Of Duplicate Records Using A Loop Pin
rowdykuttan15-Sep-09 9:23
rowdykuttan15-Sep-09 9:23 
AnswerRe: Get Count Of Duplicate Records Using A Loop Pin
PIEBALDconsult17-Sep-09 5:40
mvePIEBALDconsult17-Sep-09 5:40 
QuestionGroup header is not printing on everypage if subreport continues to next page. Pin
Kumaran21cen15-Sep-09 3:26
Kumaran21cen15-Sep-09 3:26 
QuestionHow to Change Color of the data??? Pin
Aman786Singh15-Sep-09 2:47
Aman786Singh15-Sep-09 2:47 
hi ,

I am sending a mail using SQL server 2005 msdb.dbo.sp_send_dbmail , below written is my code:-
I need to change the color of the data . depending upon the value , i want to change it's color.
Kindly help me out.

DECLARE @tableHTML NVARCHAR(MAX) ;
SET @tableHTML =
N'<H1>Cummalative Airtel Report generated every half hour</H1>' +
N'<table width="100%" style="font-family:Arial; font-size:12px; color:#000066" border="1" cellspacing="0" cellpadding="0">' +
N'<tr><td width="20%"><b>Circle</b></td><td width="11%"><b>OfferedCalls</b></td>' +
N'<td width="11%"><b>AnsweredCalls</b></td><td width="11%"><b>AbandonedCalls</b></td>' +
N'<td width="11%"><b>PCA</b></td><td width="11%"><b>ATT</b></td>' +
N'<td width="11%"><b>FCR</b></td>' +
N'<td width="11%"><b>CQ</b></td>' +
N'</tr>' +
CAST ( (Select td =t.circle, '' ,td = t.offd, '' ,td =t.answ, '' ,td =t.abnd, '' ,
--td =Convert(char,Round(t.[%abnd],2)),
-- '' ,
td =Convert(char,Round(t.pca,2)), '' ,
td =Convert(char,round(tt.SumAtt/Answ,2)), '' ,--td =ttt.[login], '' ,
td =Convert(char,Round(ttttt.[CQScore],2)),'',
td=Convert(char,Round(fcr.[fcr],2))
from <table_name>

FOR XML PATH('tr'), TYPE
) AS NVARCHAR(MAX) ) +
N'</table>' ;

EXEC msdb.dbo.sp_send_dbmail
@profile_name='MailProfile',
@recipients='abc@gmail.com',
@subject = 'TestReport',
@body = @tableHTML,
@body_format = 'HTML' ;


Regards,
Aman
QuestionReplication In SQL Server 2005? Pin
cocoonwls15-Sep-09 0:44
cocoonwls15-Sep-09 0:44 
AnswerRe: Replication In SQL Server 2005? Pin
Hulicat15-Sep-09 7:39
Hulicat15-Sep-09 7:39 
GeneralRe: Replication In SQL Server 2005? Pin
cocoonwls15-Sep-09 8:13
cocoonwls15-Sep-09 8:13 
GeneralRe: Replication In SQL Server 2005? Pin
Hulicat15-Sep-09 10:08
Hulicat15-Sep-09 10:08 
GeneralRe: Replication In SQL Server 2005? Pin
cocoonwls15-Sep-09 20:16
cocoonwls15-Sep-09 20:16 
GeneralRe: Replication In SQL Server 2005? Pin
Hulicat16-Sep-09 6:33
Hulicat16-Sep-09 6:33 
QuestionOracle query Pin
sandhya1414-Sep-09 23:22
sandhya1414-Sep-09 23:22 
AnswerRe: Oracle query Pin
sandhya1415-Sep-09 1:35
sandhya1415-Sep-09 1:35 
Questionsync services Pin
amer shammout14-Sep-09 21:13
amer shammout14-Sep-09 21:13 
Questionlocal processing, where the control renders the RDL file itself Pin
sashidhar14-Sep-09 19:51
sashidhar14-Sep-09 19:51 
QuestionMaking a Specific Stored Procedure For Search Keyword Pin
ivadak14-Sep-09 4:35
ivadak14-Sep-09 4:35 
AnswerRe: Making a Specific Stored Procedure For Search Keyword Pin
Henry Minute14-Sep-09 5:59
Henry Minute14-Sep-09 5:59 
AnswerRe: Making a Specific Stored Procedure For Search Keyword Pin
Abhishek Sur14-Sep-09 9:43
professionalAbhishek Sur14-Sep-09 9:43 
AnswerRe: Making a Specific Stored Procedure For Search Keyword Pin
Ashfield14-Sep-09 20:56
Ashfield14-Sep-09 20:56 
QuestionConverting .MDB file to .MDF in sql server 2005 Pin
sarang_k13-Sep-09 23:33
sarang_k13-Sep-09 23:33 
AnswerRe: Converting .MDB file to .MDF in sql server 2005 Pin
SeMartens14-Sep-09 0:36
SeMartens14-Sep-09 0:36 
QuestionJOIN and WHERE condiiton Pin
sujithkumarsl13-Sep-09 20:54
sujithkumarsl13-Sep-09 20:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.