We help IT Professionals succeed at work.

DTS Package Creation

463 Views
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 :

20071009;054415;

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!
Comment
Watch Question

EugeneZ ZhitomirskySQL SERVER EXPERT
CERTIFIED EXPERT

Commented:
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)
2007-10-10

--
select convert (varchar(11),getdate(),114)
12:32:27:88

Author

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
SQL SERVER EXPERT
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Sorry for delay
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.