Solved

Date conversion error is SSIS  using Data Conversion Task

Posted on 2012-04-11
4
421 Views
Last Modified: 2012-04-23
Hi Experts,

I have a package where i need to import the flat file (dailytally.csv) into a sql server table. I use data conversion tab between flat file and oledb destination. The import works fine except the datetime columns. Those columns are just taking the deault database timestamp instead of the actual timestamp in the file itself. I tried to change the data type from DT_DBDATE to DT_DBDATETIME and few others without any luck. Any suggestions appreciated. I have attached my package xml for your reference.
dailytally-ssis.txt
0
Comment
Question by:parpaa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 32

Expert Comment

by:Brendt Hess
ID: 37835337
I found the SSIS package attached, but not a sample of the data so I can see what values are actually in the datetime fields.

One suggestion - use the DT_DATE data type by preference.  This is much closer to SQL Server's internal structure.
0
 

Author Comment

by:parpaa
ID: 37838567
Thanks for your response! Yes i did try DT_DATE before and it didnt work. Iwill try it again today. I have also attached my sample data.
DailyTally-sample.xlsx
0
 
LVL 32

Accepted Solution

by:
Brendt Hess earned 500 total points
ID: 37839365
Can you send the sample as a CSV instead of an Excel spreadsheet - preferably, an actual edit of one of your CSV files with private data obfuscated?  This would make it easier to analyze, since an Excel file (for example) represents NULL values as the text string NULL, and frequently reformats the data from whatever is actually in the file.

Also, do you know which specific field in the CSV is causing it to fail?

Finally, if you simply try to use the import/export wizard in Management Studio to import the file directly into a new table, what suggested data types get used for the new table, and does the import fail?  If so, on what row (approximately).
0
 

Author Comment

by:parpaa
ID: 37840245
I have modified the file based on your requirements. The column in question are all the date column whihc are taking current db timestamp rather than actual value from the file. But you can look for 'Nom_date' column in particualr. LMK if you need  anything else.
DailyTally-sample.csv.xlsx
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

696 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