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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Date question

Status
Not open for further replies.

swoodring

Programmer
Dec 7, 2000
114
US
I am using sql server 7.0. I am using a dts to bring over data from sales files on our as/400. I have a date field format(2001-01-01) and a time field(13.00.00) which I would like to put together in a sql table as one field smalldatetime. (2001-01-01 13.00.00.000) Is this possible with a dts? The rest of the fields I'm brining over will basically just map to each other in other words straight copies.

Stacy
 
You could use an ActiveX script for that particular column, or you could import into a staging table with each going into separate columns, then insert them into the final table concatenated, similar to:

insert into MyTable
select a, b, c, cast(d+' '+e as datetime)
from MyStagingTable
Robert Bradley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top