473,383 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

SQL Running process

Hi guys

Im trying to run a SQL query that will run at the end of every week, My thought process will be to build an *.exe file, and from the scheduled tasks on windows, execute that file.

Is my thought process correct, or is there a way to todo it from SQL server?

Thanks
D
Aug 23 '06 #1
5 2566
masdi2t
37
Hi guys

Im trying to run a SQL query that will run at the end of every week, My thought process will be to build an *.exe file, and from the scheduled tasks on windows, execute that file.

Is my thought process correct, or is there a way to todo it from SQL server?

Thanks
D

first of all, u have to create a new package contains ur SQL query (using DTS), 'n the next step is creating Jobs to execute ur package.

rgds,
masdi2t
Aug 24 '06 #2
I guess you need to be a little more detailed in what you’re trying to accomplish. What type of information are you looking to gather? What platform are you on 2000 or 2005 or SQL7? There are different tool sets for all the platforms. I'm not sure that you would want to externalize your process.
Aug 25 '06 #3
Ok here is my thought process.

Im running SQL 2005, which will hold a table of news articles posted by a user...
But those articles will not stay in the database for more than a week, so say every Sunday the script??? will execute and all the records with the thats dates are 7 less than the current day will be taken out the table in inserted into another table called archives... Do you think this is the correct way of doing it or should I look at another solution.

all the general functionality I have done using ASP, But I don't want someone to go every sunday and archive all the articles.. so in my previous post is my thought process.

Hope you can help!!
Aug 25 '06 #4
I would just run a SSIS package that would insert the values into another "archive" table and delete them from the current. Schedule it to run as a job at a certain time. I wouldn’t complicate things but that’s me Mr. Simple
Aug 25 '06 #5
First as for the problem u r tryin 2 solve; ur approach is not d optimal....or so i think...

i would have added anoda column(say Archive) to d table dat contains d articles(lets say Articles Table)....The Archive column will have a bit data type; a value of 1 means d article is archive(as in: Archive? Yes! where yes is 1) n 0 means Not Archived....The default value will be 0, of course, for ds column

So u can write a T-SQL codes dat will check any article whose presence on d table exists 7 days...for doz record u will set deir their 'archive value' to 1.

u will den do job scheduling(From Ms Sql Server: tools>Job scheduling)...their u specify database n copy n paste d t-sql statement u wrote (make sure to select T-SQL Command as type of command to execute)...u den go on to specify d frequency on ol dat...

i suppose u can write d t-sql code....? let mi no if cant?

op dat solves d problem...?
Aug 30 '06 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Michael Schmitt | last post by:
Hello. What is the usual way for running functions in parallel on a multiple-processor machine. Actually I want to run a single computationally expensive function with different parameter sets....
1
by: Marc | last post by:
I want to write a C#/ASP.NET application where a user can go to a web page, start running a job, close their browser, and then come back later and see the results. The purpose for this application is...
3
by: Billg_sd | last post by:
Is there a programatic way in VB.NET to determine if a specific process is running? During an app update, I need to check if the component I'm about to replace is running. In UNIX I'd use: PS |...
6
by: Moses M | last post by:
I posted this a short while ago , but I don't think I explained the problem clearly. Task Manager lists processes running on a local system, including a "user name" associated with each process...
0
by: WATYF | last post by:
This is my problem... I have some code that starts a Process and returns it to a variable... (prcBat) At any time while that process is running... I want to be able to Kill it by pressing a...
4
by: sneffe | last post by:
Hi, im writing a program to keep track of which programs is currently running. I would like to have the caption of running programs displayed in a textbox on my form. I cant seem to find an easy way...
1
by: Anonieko | last post by:
Query: How to display progress bar for long running page Answer: Yet another solution. REFERENCE: http://www.eggheadcafe.com/articles/20050108.asp My only regret is that when click the...
5
by: mabond | last post by:
Hi recently read a posting and reply about Excel processs still running after the Appliction.Quit was called. Thought I might be able to use the same...
14
by: lmttag | last post by:
Hello. We're developing an ASP.NET 2.0 (C#) application and we're trying to AJAX-enable it. We're having problem with a page not showing the page while a long-running process is executing. So,...
4
by: commander_coder | last post by:
Hello, I write a lot of CGI scripts, in Python of course. Now I need to convert some to long-running processes. I'm having trouble finding resources about the best practices to do that. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.