DTS Package Creation

Posted on 2007-10-10
Last Modified: 2013-11-30
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 or time
All suggestions are welcomed.

Thanks in advance!
Question by:batman_k
    LVL 42

    Expert Comment

    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)
    LVL 2

    Author Comment

    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
    LVL 42

    Accepted Solution

    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;
    LVL 2

    Author Comment

    Sorry for delay

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Read about achieving the basic levels of HRIS security in the workplace.
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
    Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now