Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Transform Data Task in DTS Pacakage

Author  Topic 

danyeung
Posting Yak Master

102 Posts

Posted - 2006-06-12 : 13:48:19
I tried to do the followings in SQL query when I right click on Transform Data Task and select Propertyies in a DTS Package.

declare @JulianDay as int
set @JulianDay = DATEDIFF ( Day , '01/01/2006', getdate() ) + 1
Select * from table1 where EffDate >= @JulianDay and ExpDate < @JulianDay

It works if data is transferred between SQL Server tables. I received a "Invalid Tokens" error if data is transferred from DB2 to SQL Server. Is there a way that I can calculate the Julian day some where else and get the number for the SQL statement?

Thanks.
DanYeung
   

- Advertisement -