Anyone any tips for the most efficient way to automate procedures/sequence of queries in SQL server 2000?Set up a SQL Server Job through Enterprise Manager's SQL Server Agent.
blindman|||automate procedures and quries into stored procedures.
if you wish to schedule these tasks you can setup jobs to execute stored procedures or TSQL commnds or both.|||could triggers not be the answer........?|||Triggers are used when you want some event to occur every time data in a table is inserted, deleted, or modified.
For nightly batch processing, which is what I thought you were getting at, scheduled jobs are the most convenient method.
What kind of task are you trying to automate?
blindman|||Basically, I have a table ( or many tables) which are going to be updated several times a week, after which some queries will be run...............just need to automate this process......|||Actually..I think using schduled jobs and sprocs is my answer...do you tend to agree?|||Absolutely.
Showing posts with label efficient. Show all posts
Showing posts with label efficient. Show all posts
Thursday, March 8, 2012
Wednesday, March 7, 2012
Automate query output to .txt or .csv file
Good day!
What is the easiest most efficient way to output a query to a .txt or .csv?
JPThis depends on you OS (MS-Windows or UNIX or ...) and your DBMS (DB2 or Oracle or ...)
Essentially, in all cases, you may do something like
DBMS "SELECT * FROM table" > file.txt
where "DBMS" is the command to run the DBMS SQL interpreter from the command line.|||Yes, I should probably included that info!
Windows Server 2003
SQL 2000
Thanks for the help!
JP
What is the easiest most efficient way to output a query to a .txt or .csv?
JPThis depends on you OS (MS-Windows or UNIX or ...) and your DBMS (DB2 or Oracle or ...)
Essentially, in all cases, you may do something like
DBMS "SELECT * FROM table" > file.txt
where "DBMS" is the command to run the DBMS SQL interpreter from the command line.|||Yes, I should probably included that info!
Windows Server 2003
SQL 2000
Thanks for the help!
JP
Subscribe to:
Posts (Atom)