all groups > sql server dts > august 2005 >
You're in the

sql server dts

group:

DTS from paradox: time datatype


DTS from paradox: time datatype Gil Yoktan
8/28/2005 12:00:00 AM
sql server dts:
SQL-SERVER 2000
Hello - I want to import data from a paradox table. In this pdx table I
found 2 fields: one for Date defined as pdx Date datatype and one for Time
defines as pdx Time datatype. I cannot change that. I built a DTS - which
fails on the Time field (defined as SmallDateTime in the SQLServer
destination table). My problem is how to let DTS insert the Time value into
a SmallSateTime MSSQL field ?
I tried concatenation, I tried using "convert" to convert the date source
field in a varchar and then concatenating it
All my attempts failed. Myabe you know how to do it ?
(BTW - I don't mind which date is put in the "Date" part of the field value
as I want to extract the time part programmatically, eventhough it could be
nice to have the contents of the "Date" field there...
Thanks in advance Gil Yoktan

Re: DTS from paradox: time datatype Allan Mitchell
8/28/2005 12:00:00 AM
What is the error?
What code have you tried?

Paradox as I recall has a larger range of dates possible in the Date
datatype than a SQL Server smalldatetime (or datetime for that matter) can
handle (January , 9999 BC to December 3 , 9999 AD)

Allan


[quoted text, click to view]

Re: DTS from paradox: time datatype Gil Yoktan
8/28/2005 8:47:41 PM
Thanks for your response

I tried changing the main SQL from
DTSDestination("Start_Date") = DTSSource("Start_Date")
DTSDestination("Start_Time") = DTSSource("Start_Time")
to
DTSDestination("Start_Date") = DTSSource("Start_Date")
DTSDestination("Start_Time") = DTSSource("Start_Date") +
DTSSource("Start_Time") - no luck

and to
DTSDestination("Start_Date") = DTSSource("Start_Date")
DTSDestination("Start_Time") = convert(varchar, DTSSource("Start_Date"),
10) + DTSSource("Start_Time") - no luck




Re: DTS from paradox: time datatype Allan Mitchell
8/29/2005 8:36:24 AM
And the errors are what? Like I said, the ranges of dates are different for
SQL Server and paradox. Also if the format coming from paradox is not
interpretable by SQL Server then valid date/time or not you wil not be able
to insert.

Allan


[quoted text, click to view]

AddThis Social Bookmark Button