DTS Copy, Delete, Empty tables?

DTS Copy, Delete, Empty tables?

Post by Edward Haste » Sat, 11 May 2002 20:28:47



The more advanced aspects of DTS seem to be available but how do I:

* Empty a table
* Copy or Delete a table

from within the DTS screen?

TIA,

Ed

 
 
 

DTS Copy, Delete, Empty tables?

Post by Darren Gree » Sat, 11 May 2002 21:52:53



Quote:> The more advanced aspects of DTS seem to be available but how do I:

> * Empty a table
> * Copy or Delete a table

> from within the DTS screen?

Not sure what you mean by the DTS screen, but within the package designer
you can add an Execute SQL Task to run any SQL you wish such as TRUNCATE
TABLE MyTable or DELETE MyTable etc.

If using the wizard, you will need to save the package at the end and open
in manually from the DTS node in Enterprise Manager.

--
Darren Green (SQL Server MVP)
http://www.sqldts.com

 
 
 

DTS Copy, Delete, Empty tables?

Post by G. Waleed Kavale » Sat, 11 May 2002 21:57:31


The DTS screen is one MDI child of EM, just shrink it.

The DTS package designer doesn't have those functions, live, but you can
certainly add them as tasks.

--
G. Waleed Kavalec
-------------------
Quidquid latine dictum sit, altum sonatur.

Quote:> The more advanced aspects of DTS seem to be available but how do I:

> * Empty a table
> * Copy or Delete a table

> from within the DTS screen?

> TIA,

> Ed

 
 
 

DTS Copy, Delete, Empty tables?

Post by Edward Haste » Sat, 11 May 2002 23:49:15


Yup that worked a treat - thanks.

Ed

 
 
 

DTS Copy, Delete, Empty tables?

Post by G. Waleed Kavale » Sun, 12 May 2002 05:07:44


BTW you *can* drag a new SQL task, write your SQL, then right-click and ONLY
execute that task.

--
G. Waleed Kavalec
-------------------
Quidquid latine dictum sit, altum sonatur.

Quote:> Yup that worked a treat - thanks.

> Ed

 
 
 

1. Add records to an empty table - AddNewX.cpp example fails with an empty table

Hi !

I did not succeed to add a new record to a table if there are no records in
it.
I tried to use Microsoft's example - AddNewX.cpp (in VC++) with MS-SQL 7.0 .
There is the code from the program. It fails in the AddNew.

 pConnection.CreateInstance(__uuidof(Connection));
 hr = pConnection->Open(strCnn,"","",NULL);

 pRstEmployees.CreateInstance(__uuidof(Recordset));
 pRstEmployees->Open("employee",_variant_t((IDispatch *) pConnection,
true),adOpenKeyset,adLockOptimistic,adCmdTable);

pRstEmployees->QueryInterface(__uuidof(IADORecordBinding),(LPVOID*)&picRs);

picRs->BindToRecordset(&emprs);

  strcpy(emprs.m_sz_empid, "BAS55555M");
  strcpy(emprs.m_sz_fname, "BOB");
  strcpy(emprs.m_sz_lname, "PETER");

  picRs->AddNew(&emprs);

Thanks,
Tzahi Fridman.

2. Date Calculations

3. How can I copy an SQL selection to an empty temp table

4. can SQL syntax be used across DB platforms

5. copy an empty table

6. How to use date mask 'dd-MON-rr'?

7. instead of delete trigger delete data from table using execute and temporary table for deleted

8. Datagrid question

9. to DELETE an empty table gives me a error..(Ado and AS400)

10. DTS package to delete SQL table and bring in AS400 table

11. DTS question: how to empty table

12. DTS runs successfully but sometimes some tables are empty

13. DTS VB Package can only create a empty table in the database