dbTalk Databases Forums  

Adding a time stamp

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


Discuss Adding a time stamp in the microsoft.public.sqlserver.dts forum.



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

Default Adding a time stamp - 02-15-2005 , 06:02 PM






I am making a DTS package that will import several columns from an
Excel spread sheet. I will be appending these imports to a table on the
SQL server. As the Excel spread sheet I get comes from several people
and are all named then same I need a time stamp each time the DTS
package runs. I already have a unique ID number for each person. The
Excel spread sheet dose not have a time stamp on it. Plus for other
reasons I need to record only when the server runs the DTS package, not
when the person submitted the sheet.

I have ever real ran DTS packages except to do one time imports or
exports. I tried using the DTS wizard to set up a scheduled package.
The problem I am having is figuring out where I can declare the time
stamp.

Any help would be helpful...


Reply With Quote
  #2  
Old   
Jim Young
 
Posts: n/a

Default Re: Adding a time stamp - 02-16-2005 , 12:13 AM






Use the getdate() function as a value for an INSERT or UPDATE operation

Jim

"Data_Monkey" <Eric.Tashchian (AT) navsoc (DOT) navy.mil> wrote

Quote:
I am making a DTS package that will import several columns from an
Excel spread sheet. I will be appending these imports to a table on the
SQL server. As the Excel spread sheet I get comes from several people
and are all named then same I need a time stamp each time the DTS
package runs. I already have a unique ID number for each person. The
Excel spread sheet dose not have a time stamp on it. Plus for other
reasons I need to record only when the server runs the DTS package, not
when the person submitted the sheet.

I have ever real ran DTS packages except to do one time imports or
exports. I tried using the DTS wizard to set up a scheduled package.
The problem I am having is figuring out where I can declare the time
stamp.

Any help would be helpful...




Reply With Quote
  #3  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Adding a time stamp - 02-16-2005 , 12:38 AM



OK so what you can do is this

The SQL Server table has a DateTime on it right ready for you?

In your transformations tab

Choose the destination column ONLY
Click New
Click Active X Script
Click Properties

In there enter something like

DTSDestination("Column Name Goes Here") = Now()


OK out of that.

When you look at your transforms now you should see that you have an
arrow pointing to the destination column but it orginates from somewhere
out of the top of the sheet.

If you need more help shout.

Allan

"Data_Monkey" <Eric.Tashchian (AT) navsoc (DOT) navy.mil> wrote

Quote:
I am making a DTS package that will import several columns from an
Excel spread sheet. I will be appending these imports to a table on the
SQL server. As the Excel spread sheet I get comes from several people
and are all named then same I need a time stamp each time the DTS
package runs. I already have a unique ID number for each person. The
Excel spread sheet dose not have a time stamp on it. Plus for other
reasons I need to record only when the server runs the DTS package, not
when the person submitted the sheet.

I have ever real ran DTS packages except to do one time imports or
exports. I tried using the DTS wizard to set up a scheduled package.
The problem I am having is figuring out where I can declare the time
stamp.

Any help would be helpful...


Reply With Quote
  #4  
Old   
Data_Monkey
 
Posts: n/a

Default Re: Adding a time stamp - 02-16-2005 , 01:27 PM



Thanx Allan!
That just what I needed. I did not realize that how to import a from
some where outside the connections I was working with. The
Transformations section was all new to me...


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.