473,791 Members | 2,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DTS Package

I want to create a DTS package that will.

Cleardown all rows in a table called stock
Then populate stock with all data from another table called stock1.

I also want to schedule it to run everymorning.
Can anyone help?

Regards,
Ciarán
Jul 20 '05 #1
2 1528
Hi

You don't need DTS to do this, a standard SQL Agent job can have steps that
run TSQL commands.
Depending on your requirements you can either TRUNCATE the table to remove
all the records or use the DELETE statement. To re-populate the data you can
use an insert statement with a derived table. More information on these
statements are in Books Online.

To create your job you can either do it using Enterprise Manager or by using
the procedures sp_add_job and sp_add_jobstep. Again more details and
examples can be found in Books Online.

I would also recommend that you wrote a stored procedure to handle the
actions required, then you call it from the job step. This will help
maintenance and mean that you can call the same code from other places.

John

"Ciar?n" <ch********@hot mail.com> wrote in message
news:7f******** *************** *@posting.googl e.com...
I want to create a DTS package that will.

Cleardown all rows in a table called stock
Then populate stock with all data from another table called stock1.

I also want to schedule it to run everymorning.
Can anyone help?

Regards,
Ciarán

Jul 20 '05 #2
If you don't feel comfortable using the SWL agent you can
write a standard SQL script to do this.
something like

delete from stock
insert stock
select *
from stock1

save it on your server, then up a batch file using the osql utility
something like:
osql /E /i c:\script_name. sql

this should then run the sql script by clicking on the batch file and
can then be scheduled to run uing the windows scheduled tasks feature.
"John Bell" <jb************ @hotmail.com> wrote in message news:<%o******* ************@ne ws-text.cableinet. net>...
Hi

You don't need DTS to do this, a standard SQL Agent job can have steps that
run TSQL commands.
Depending on your requirements you can either TRUNCATE the table to remove
all the records or use the DELETE statement. To re-populate the data you can
use an insert statement with a derived table. More information on these
statements are in Books Online.

To create your job you can either do it using Enterprise Manager or by using
the procedures sp_add_job and sp_add_jobstep. Again more details and
examples can be found in Books Online.

I would also recommend that you wrote a stored procedure to handle the
actions required, then you call it from the job step. This will help
maintenance and mean that you can call the same code from other places.

John

"Ciar?n" <ch********@hot mail.com> wrote in message
news:7f******** *************** *@posting.googl e.com...
I want to create a DTS package that will.

Cleardown all rows in a table called stock
Then populate stock with all data from another table called stock1.

I also want to schedule it to run everymorning.
Can anyone help?

Regards,
Ciarán

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
12682
by: chris.dunigan | last post by:
I'm looking for an example of how to execute an existing DTS­ package from an ASP (VB)script and would appreciate any and all response. ­I don't even know if it's possible Thanks - Chuck Gatto Dan Guzman Apr 27 2000, 12:00 am show options
3
1936
by: Petterson Mikael | last post by:
Hi, I have the following package names ( in an xml) that I will transform to html. I need to sort them. <package name="se.company.product.subproduct.boam.fpx.testsignals"> <package name="se.company.product.subproduct.boam.mao.iface.enum.hidden"> When I use <xsl:sort select="." order="ascending"/>
10
4857
by: datapro01 | last post by:
Running DB2 8.1.6A on AIX 5.1 We are experience package cache overflows. The high water mark for package cache is showing as 16,108,513 bytes, or approximately 3933 4K pages. The package cache size is set at Maxapples * 8 Maxapples is at 500.
6
2001
by: Page Horton | last post by:
I have a ASP.NET (VB) web application running. The DTS package is suppose to generates a flat file to a file path (aka: \\myStation\outputFiles\). When it runs it generates the following error on one of the steps (the others run successfully): Step 'Copy Data from Results to H:\Data\outfilename.txt Step' failed Step Error Source: Microsoft Data Transformation Services Flat File Rowset Provider Step Error Description:Error opening...
3
2836
by: shorti | last post by:
running on AIX with DB2 v8.2.2 I ran across a problem with naming source files with similar names. For instance, if I have these three files: upd_startaccessingdb.sqc upd_startusingdb.sqc upd_startreconproc.sqc and I precompile like so:
1
6736
by: Laurence | last post by:
Hi folks, In the middle of page 231 on the book "Administration Guide - Implementation" stated - "In addition to these package privileges, the BINDADD database privilege allows users to create new packages or rebind an existing package in the database." Previously, I think that the BIND package privilege is required for binding an existing package in the database, and the BINDADD database privilege is only for new package. Now, I'm...
0
6264
debasisdas
by: debasisdas | last post by:
PACKAGE WITH LOCAL FUNCTION ============================= create or replace package my_pkg as procedure my_proc(arg1 in varchar2); function my_fun(arg1 in number) return varchar2; end my_pkg; PACKAGE BODY
0
3880
debasisdas
by: debasisdas | last post by:
The following thread contains some useful tips/sample codes regarding PACKAGES in oracle, that the forum members may find useful. A package is a collection of procedures,functions,cursors,global variables etc. A package is also stored as an Object in the database. A package ha s two parts 1. Package-------------Specification. 2. Package body---Implimentaton.
0
3849
debasisdas
by: debasisdas | last post by:
SAMPLE PACKAGE EX#3 ==================== PACKAGE SPECIFICATION -------------------------------------------- CREATE OR REPLACE PACKAGE MYPACK AS PROCEDURE SHOWENAME(EMPID IN NUMBER); FUNCTION SHOWSAL(EMPID IN NUMBER) RETURN NUMBER; END MYPACK;
0
1922
by: Steven Samuel Cole | last post by:
Hi Stephane, thanks for your reply! :-) I do not get any notification or warning or whatever from dpkg, all output I get when running # sudo dpkg -i python-<package name>_0.0.1-4927-1_all.deb is Selecting previously deselected package python-<package name>. (Reading database ... 15026 files and directories currently installed.)
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9515
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10426
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10154
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5558
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3713
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2913
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.