Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple DTS?

Status
Not open for further replies.

eggy168

Programmer
Mar 6, 2002
220
US
The DTS has been working, but I want to add a column (SQLtime with Timestamp as the Data Type or the Data Type is wrong?) in the destination table that includes the Time that record the DTS finishing time.

The DTS is a simple Select statement that copy data from Table A from Server One to Table B to Server B with all the columns are matching. It started from Truncated the destination table, then used the Transform Data Task where the Select statement is written. Once I run the DTS package, the column, SQLtime is null.

Can anyone helps or guide me to make it works? Thank you.

 
You don't want to use a Timestamp data type. You want to use DateTime or SmallDateTime. But, you need to get a value into your new field. Try modifying your source query as such:

Code:
DECLARE @CurrTime DATETIME
SELECT @CurrTime = GETDATE()
SELECT *, @CurrTime AS CurrTime FROM TableA

Then, in your Transform Data Task, map the new CurrTime field from your source query to your SQLtime in your destination.
 
It works now. Thank you very much RiverGuy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top