August 3, 2004 at 1:34 pm
Hello,
I would like to know if it's possible to automate the following steps:
1. Right-click existing table and delete
2. Create a new table and import the xls file (DTS)
3. Make a minor adjusment to the type and field size of 2 elements
4. The table is ready
I'm just barely dabbling in WMI+ADSI scripting. I'm thinking that maybe the above steps could be scripted and the resulting script could be run through a schedule. This is a daily manual task and would like to automate in full. Your input is greatly appreciated
We're running MS Windows 2000 Server and MS SQL Server 2000.
Thanks,
Hector
August 3, 2004 at 2:11 pm
This can all easily be done in DTS. See
http://www.sqlservercentral.com/columnists/jsack/capturingtheerrordescriptioninastoredprocedure.asp
and
http://www.sqldts.com/Default.aspx
for ideas on how to write your DTS scripts. You will need to write some DDL statements in an Execute SQL task to drop a table and alter columns.
[font="Courier New"]ZenDada[/font]
August 3, 2004 at 5:25 pm
Wow! Thanks for your reply. It definitely steered me in the right direction.
P.S. Clicked on your zendadacats.com link, loved them!
August 4, 2004 at 9:44 am
IF the structure of your table does not change from one load to the next, it might be easier and faster to TRUNCATE table tablename then do the import.
Butch
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply