473,909 Members | 5,658 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 1531
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
12689
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
1940
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
4869
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
2006
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
2841
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
6739
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
6270
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
3892
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
3856
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
1935
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
9879
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
11348
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...
0
10921
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9727
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8099
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
7249
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
5938
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4776
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4336
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.