?
Solved

DTS Character Date into DateTime field

Posted on 2003-03-07
4
Medium Priority
?
909 Views
Last Modified: 2013-11-30
I am trying to import data into an SQL 2000 table that includes dates using DTS.  The import flat (text) file is fixed field delimited and fairly straight forward.  I attempt to import a 10 character date (MM/DD/YYYY) from a fixed position of the text file into a column of a SQL2K table defined as smalldatetime (or datetime, neither works).  When setting up the transformation in DTS and trying to map the column containing the date from the text file to the column in the SQL2K table I get the following message:

An error occurred when you tried to submit changes to this transform.  Please refer to the following error message and make sure that you have edited other properties of this transform by pressing "Properties" button under the "General" tab.
Error Source : Microsoft Data Transformation Services (DTS) Data Pump.

Error Description: DTSTransformCopy: Schema validation failed; see Extended Error information.
TransformCopy '(no name)' validation error: Source column too narrow to contain a valid value of the destination column's datatype for column pair 1 (source column 'Col013' (DBTYPE_STR), destination column 'ppp_date' (DBTYPE_DBTIMESTAMP).


My client is running SQL 2000 - SP2 (I believe).  Any thoughts on how to get this done without creating a temp column of CHAR(10) and updating the DateTime column with the temp column value ???
0
Comment
Question by:mcmelvin33
[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
4 Comments
 
LVL 3

Accepted Solution

by:
Frostbyte_Zero earned 500 total points
ID: 8090699
Try running it using a ActiveX Script, like this:

Function Main()
  If IsDate(DTSSource("Col013") Then
    DTSDestination("ppp_dt") = CDate(DTSSource("Col013"))
    Main = DTSTransformStat_OK
  Else
    Main = DTSTransformStat_Fail
  End If
End Function
0
 

Expert Comment

by:CleanupPing
ID: 9276059
mcmelvin33:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 12

Expert Comment

by:monosodiumg
ID: 11042425
No comment has been added to this question in more than 251 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
   Accept: Frostbyte_Zero http:#8090699

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

monosodiumg
EE Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

762 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