dbTalk Databases Forums  

DTS from paradox: time datatype

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss DTS from paradox: time datatype in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Gil Yoktan
 
Posts: n/a

Default DTS from paradox: time datatype - 08-28-2005 , 08:17 AM






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



Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS from paradox: time datatype - 08-28-2005 , 11:21 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


"Gil Yoktan" <gil (AT) tadiad (DOT) co.il> wrote

Quote:
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





Reply With Quote
  #3  
Old   
Gil Yoktan
 
Posts: n/a

Default Re: DTS from paradox: time datatype - 08-28-2005 , 10:47 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




*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS from paradox: time datatype - 08-29-2005 , 02:36 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


"Gil Yoktan" <gil (AT) tadiad (DOT) co.il> wrote

Quote:
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




*** Sent via Developersdex http://www.developersdex.com ***



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.