Click here to Skip to main content
15,891,762 members
Home / Discussions / Database
   

Database

 
QuestionDate Problem Pin
Syed Shahid Hussain24-Sep-09 22:51
Syed Shahid Hussain24-Sep-09 22:51 
AnswerRe: Date Problem Pin
J4amieC24-Sep-09 23:06
J4amieC24-Sep-09 23:06 
GeneralRe: Date Problem Pin
Syed Shahid Hussain25-Sep-09 1:23
Syed Shahid Hussain25-Sep-09 1:23 
AnswerRe: Date Problem Pin
David Skelly25-Sep-09 2:26
David Skelly25-Sep-09 2:26 
GeneralRe: Date Problem Pin
Syed Shahid Hussain25-Sep-09 2:37
Syed Shahid Hussain25-Sep-09 2:37 
AnswerRe: Date Problem Pin
PIEBALDconsult26-Sep-09 4:47
mvePIEBALDconsult26-Sep-09 4:47 
GeneralRe: Date Problem Pin
Syed Shahid Hussain26-Sep-09 5:11
Syed Shahid Hussain26-Sep-09 5:11 
QuestionQueries On SQL Job [modified] Pin
Payal_e_m24-Sep-09 14:04
Payal_e_m24-Sep-09 14:04 
Hi,

I am using SQl 2005 for setting up a job which has 2 steps:-

Step 1: Executes a SP which sends out result to a file
Type : T-SQL
Command :
DECLARE @cmd varchar(2000),
SET @cmd = 'osql -E -S CONDOR -s";" -w2000 -d Arion -Q"EXEC dbo.ENRSP_Applicants" -o D:\Applicants.txt'
EXEC master..xp_cmdshell @cmd

Step 2: Mailing the txt file to the user
Type : Operating System(CmdExec)
Command :
"D:\MSSQL\JOBS\EmailFile.cmd" D:\Applicants.txt aa@yahoo.com ss@yahoo.com "Applicants Report"

This works fine but the user want some modification to the current Job
* the email subject to include the date also
* Wants the result set to be dumped into a CSV file and to attach the file to the mail
* Can you also tell me how to include a message to the mail plz?

I know its easy to get this all done using a SSIS but Can these be done using an SQL Job , if so can you plz help me with it?

Thanks in advance.

Warm regards,
Payal

modified on Thursday, September 24, 2009 11:10 PM

QuestionSELECT INTO or CREATE TABLE Pin
bxlorenz24-Sep-09 10:30
bxlorenz24-Sep-09 10:30 
AnswerRe: SELECT INTO or CREATE TABLE [modified] Pin
Blikkies24-Sep-09 19:22
professionalBlikkies24-Sep-09 19:22 
GeneralRe: SELECT INTO or CREATE TABLE Pin
bxlorenz25-Sep-09 4:22
bxlorenz25-Sep-09 4:22 
QuestionDisplay few columns in datagridview. Pin
jeshra27924-Sep-09 8:30
jeshra27924-Sep-09 8:30 
AnswerRe: Display few columns in datagridview. Pin
Dave290924-Sep-09 12:49
Dave290924-Sep-09 12:49 
AnswerRe: Display few columns in datagridview. Pin
Syed Shahid Hussain24-Sep-09 22:19
Syed Shahid Hussain24-Sep-09 22:19 
QuestionHow do I automatically backup my sql server 2005 express database on another server? Pin
Nada Adel24-Sep-09 2:15
Nada Adel24-Sep-09 2:15 
AnswerRe: How do I automatically backup my sql server 2005 express database on another server? Pin
Abhishek Sur24-Sep-09 3:33
professionalAbhishek Sur24-Sep-09 3:33 
AnswerRe: How do I automatically backup my sql server 2005 express database on another server? Pin
Johan Hakkesteegt24-Sep-09 5:56
Johan Hakkesteegt24-Sep-09 5:56 
QuestionHow to Optimize MySql Database? Pin
Paramhans Dubey23-Sep-09 21:40
professionalParamhans Dubey23-Sep-09 21:40 
AnswerRe: How to Optimize MySql Database? Pin
Ashfield24-Sep-09 1:26
Ashfield24-Sep-09 1:26 
GeneralRe: How to Optimize MySql Database? Pin
Paramhans Dubey24-Sep-09 2:15
professionalParamhans Dubey24-Sep-09 2:15 
AnswerRe: How to Optimize MySql Database? Pin
Dave290924-Sep-09 12:45
Dave290924-Sep-09 12:45 
QuestionNesting a stored proc call in a where clause? Pin
Dave290923-Sep-09 14:23
Dave290923-Sep-09 14:23 
AnswerRe: Nesting a stored proc call in a where clause? Pin
Dave290923-Sep-09 14:54
Dave290923-Sep-09 14:54 
AnswerRe: Nesting a stored proc call in a where clause? Pin
Ashfield23-Sep-09 21:16
Ashfield23-Sep-09 21:16 
QuestionRe: Nesting a stored proc call in a where clause? Pin
Dave290924-Sep-09 12:37
Dave290924-Sep-09 12:37 

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.