• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 453
  • Last Modified:

DTS Package Creation

Hi All,
Please help on the following DTS package construction:
From flat file we exporting data to MS SQL2000 where under 2 tables called Date and Time we uploading comma separated values like :


Please advice on best solution how those values to be exported directly to Table1 as:
2007-10-09 as Date and 05:44:15.000 as Time

Please, we need data to be exported as requested format. Running query after export......we need to sleep at that time :). Data type (On database Table1) can be change as per your recommendation. We didnt succeed that much with exported data and changing data type to....date or time
All suggestions are welcomed.

Thanks in advance!
  • 2
  • 2
1 Solution
Eugene ZCommented:
use varchar datatype in the sql server tables and convert function
/SQL Server 2005 Books Online  CAST and CONVERT (Transact-SQL)  /


for example:

select convert (varchar(10),getdate(),120)

select convert (varchar(11),getdate(),114)
batman_kAuthor Commented:
Hi Eugene,
Thats why you are "Genuis" and we......

Please explain it in actual DTS package where this will go.
We are not that much in Transact-SQL
Eugene ZCommented:
everyone is Genuis just does not know yet:)

you can import (DTS) in temp table as step 1
then as step 2 insert into destination table your "fixed" data

you can use Bulk insert instead of dts


see example;

batman_kAuthor Commented:
Sorry for delay

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now