dbTalk Databases Forums  

Re: Multiple DTS Packages

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Re: Multiple DTS Packages in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Multiple DTS Packages - 08-15-2003 , 03:34 PM






To delete data from just certain tables then use the ExecuteSQL task. Are
these tables constant or changing ? If changing then pass them into SQL
Server through an INI file or DB table. You can thn read the values, split
them up and issue statements i.e

I know this table breaks all rules but example only

CREATE TABLE TablesToDelete (RunNr INT PRIMARY KEY, DateOfRun smalldatetime
, TableToDelete varchar(30))

INSERT TablesToDelete(RunNr, Tables)
VALUES(1,'authors','publishers','titles')

Using a Dynamic Properties task you can read this and assign to a variable.
Using the SPLIT() function you can then build a statement

The other way of doing the table is

CREATE TABLE TableToDelete (RunNr INT PRIMARY KEY , TableToDelete
varchar(30))

INSERT TablesToDelete(RunNr, TableToDelete) VALUES(1,'authors')
INSERT TablesToDelete(RunNr, TableToDelete) VALUES(1,'publishers')
INSERT TablesToDelete(RunNr, TableToDelete) VALUES(1,'titles')


You get the idea

--


Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.