Click here to Skip to main content
15,924,196 members
Home / Discussions / Database
   

Database

 
AnswerRe: Manipulate SQL String Pin
DerekFL25-Aug-08 10:09
DerekFL25-Aug-08 10:09 
GeneralRe: Manipulate SQL String Pin
tantja25-Aug-08 13:02
tantja25-Aug-08 13:02 
AnswerRe: Manipulate SQL String Pin
Blue_Boy25-Aug-08 11:09
Blue_Boy25-Aug-08 11:09 
QuestionRe: Manipulate SQL String Pin
tantja26-Aug-08 10:59
tantja26-Aug-08 10:59 
AnswerRe: Manipulate SQL String [modified] Pin
Blue_Boy26-Aug-08 19:54
Blue_Boy26-Aug-08 19:54 
GeneralRe: Manipulate SQL String Pin
tantja27-Aug-08 3:39
tantja27-Aug-08 3:39 
GeneralRe: Manipulate SQL String Pin
Blue_Boy27-Aug-08 3:42
Blue_Boy27-Aug-08 3:42 
Question@query_result_header = '1', not working? my email output doesnt include cloumn headers.....why? Pin
Hulicat25-Aug-08 5:30
Hulicat25-Aug-08 5:30 
Does anyone happen to know why the column headers to do render in the
email? I have the bit set to '1' which should pass the column headers
in the attachment?


exec [msdb].[dbo].[sp_send_dbmail] @profile_name =
'dbmailden', @recipients = em...@email.com,


@subject = 'Weekly Tickets Reported in the Last 7 Days',
@query_result_width = '3250',
@query_no_truncate = '1',
@query_result_header = '1',
@query_result_separator = ' ',
@execute_query_database = 'webhelp2', @attach_query_result_as_file =
'1',
@query_attachment_filename = 'weeklyticketssummery.xls', @query = '
select count(*) as [Total Tickets Assigned]
, location_name [Cient], Priority_type_name [Priority],
SUM(CASE
WHEN DATEDIFF(DAY, Report_Date,
CURRENT_TIMESTAMP)
BETWEEN 2 AND 6
THEN 1
ELSE 0
END) AS over_2_days,
SUM(CASE
WHEN DATEDIFF(DAY, Report_Date,
CURRENT_TIMESTAMP)
BETWEEN 7 AND 14
THEN 1
ELSE 0
END) AS over_7_days,
SUM(CASE
WHEN DATEDIFF(DAY, Report_Date,
CURRENT_TIMESTAMP) >= 15
THEN 1
ELSE 0
END) AS over_15_days ,
SUM(CASE
WHEN DATEDIFF(DAY, Report_Date,
CURRENT_TIMESTAMP) >= 30
THEN 1
ELSE 0
END) AS over_30_days
from job_ticket j


inner join priority_type p on p.priority_type_id = j.priority_type_id
inner join tech t on t.client_id = j.assigned_tech_id
inner join location l on l.location_id = j.location_id
where status_type_id != 3
group by p.Priority_type_name, l.location_name'

Regards,
Hulicat

Questionwhat does this mean "Integrirty constraint vialoation" while trying to write data into oracle tables ? Pin
Sakthiu25-Aug-08 5:23
Sakthiu25-Aug-08 5:23 
AnswerRe: what does this mean "Integrirty constraint vialoation" while trying to write data into oracle tables ? Pin
Tim Carmichael25-Aug-08 5:26
Tim Carmichael25-Aug-08 5:26 
AnswerError code ? Pin
David Mujica25-Aug-08 5:41
David Mujica25-Aug-08 5:41 
AnswerRe: what does this mean "Integrirty constraint vialoation" while trying to write data into oracle tables ? Pin
shubhi27-Aug-08 22:53
shubhi27-Aug-08 22:53 
QuestionSQL Server Connectivity Pin
Zafar Sultan25-Aug-08 3:49
Zafar Sultan25-Aug-08 3:49 
AnswerRe: SQL Server Connectivity Pin
Colin Angus Mackay25-Aug-08 4:24
Colin Angus Mackay25-Aug-08 4:24 
AnswerRe: SQL Server Connectivity Pin
Colin Angus Mackay25-Aug-08 21:12
Colin Angus Mackay25-Aug-08 21:12 
GeneralRe: SQL Server Connectivity Pin
Zafar Sultan26-Aug-08 0:03
Zafar Sultan26-Aug-08 0:03 
Questionsql Server client Users Increase Pin
rrrriiizz25-Aug-08 2:42
rrrriiizz25-Aug-08 2:42 
AnswerRe: sql Server client Users Increase Pin
Colin Angus Mackay25-Aug-08 2:49
Colin Angus Mackay25-Aug-08 2:49 
GeneralRe: sql Server client Users Increase Pin
rrrriiizz25-Aug-08 17:05
rrrriiizz25-Aug-08 17:05 
GeneralRe: sql Server client Users Increase Pin
Colin Angus Mackay25-Aug-08 21:09
Colin Angus Mackay25-Aug-08 21:09 
QuestionHow to get a list of Recently Viewed Reports in SSRS Pin
archie@hyd25-Aug-08 2:10
archie@hyd25-Aug-08 2:10 
QuestionDatabase Migration to SQL SERVER 2008 Pin
rajg8225-Aug-08 1:34
rajg8225-Aug-08 1:34 
AnswerRe: Database Migration to SQL SERVER 2008 Pin
ChandraRam25-Aug-08 1:44
ChandraRam25-Aug-08 1:44 
RantYour work Pin
David Mujica25-Aug-08 3:32
David Mujica25-Aug-08 3:32 
JokeRe: Your work Pin
Paul Conrad25-Aug-08 8:08
professionalPaul Conrad25-Aug-08 8:08 

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.