Advertisement

03.17.2008 at 11:39AM PDT, ID: 23247988
[x]
Attachment Details

Create a daily scheduled job

Asked by prathap2 in SQL Server 2008

Tags: Microsoft, SQL server 2005, 2005

I'm trying to schedule a daily job to pull out specific data from a table that gets added every night. I accessed Jobs icon under SQL server agent and proceeded to creating a job using 'new job'.

A new table gets created with the name prathab_table_date (Name changed due to security reasons.) I would like to pull out data matching the domain name (domain name is a field in this particular table) 'xxx' and I go onto define what other fields I would like to see along with that. In the properties window, I went to steps tab and here is what my command looks like.

SELECT     field A, field B, field C, field D, domainname
FROM         prathab_table
WHERE     (DOMAINNAME = 'xxx')

On this very window, I selected the type to be transact-SQL script (TSQL). There are quite a few options to choose from such as operating system command (CmdExec) DTS, replication distributor, etc.

While my query works, there are couple of things it wont do for me. Where exactly do I define what type of report I would like, for example, a CSV file, excel file, word doc. Secondly, since my table gets added the date with the table name prathab_table_todaysdate, how can I define this so that that day's date will get appended to the query, before its run.

We dont necessarily have to use transact SQL, as long as it works, I'm ok with any mechanism.

Thanks for your help in advance.

PKStart Free Trial
[+][-]03.17.2008 at 11:43AM PDT, ID: 21144886

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.17.2008 at 11:49AM PDT, ID: 21144935

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.17.2008 at 12:00PM PDT, ID: 21145040

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.18.2008 at 06:47AM PDT, ID: 21150868

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.18.2008 at 06:49AM PDT, ID: 21150887

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.18.2008 at 06:51AM PDT, ID: 21150912

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.18.2008 at 07:31AM PDT, ID: 21151378

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.18.2008 at 07:32AM PDT, ID: 21151392

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.18.2008 at 07:38AM PDT, ID: 21151479

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.18.2008 at 07:45AM PDT, ID: 21151561

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.18.2008 at 07:48AM PDT, ID: 21151600

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.18.2008 at 08:01AM PDT, ID: 21151749

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.18.2008 at 08:05AM PDT, ID: 21151803

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: SQL Server 2008
Tags: Microsoft, SQL server 2005, 2005
Sign Up Now!
Solution Provided By: chapmandew
Participating Experts: 1
Solution Grade: B
 
 
[+][-]03.18.2008 at 08:12AM PDT, ID: 21151886

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628