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)
 Migration Sybase ASE 12.5 to SQL Server 2000

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-10-23 : 07:42:25
Javier Lepiscopo writes "Hello Team,

I'm trying to migrate data from Sybase ASE 12.5 to SQL Server 2000 and I make a DTS connecting from the Sybase to the SQL Server table.

The Windows XP version is 2002 and Service Pack 1

Here is the query on the Transform Data Task:

SELECT *
FROM blue.dbo.iApplicationStat
WHERE Timestamp BETWEEN
datename(year, (DATEADD(day, -1, getdate()))) || '-' || datename(month, (DATEADD(day, -1, getdate()))) || '-' || datename(day, (DATEADD(day, -1, getdate()))) || ' 00:00:00'
AND
datename(year, (DATEADD(day, -1, getdate()))) || '-' || datename(month, (DATEADD(day, -1, getdate()))) || '-' || datename(day, (DATEADD(day, -1, getdate()))) || ' 00:15:59'
AND
ApplicationID = 1
ORDER BY
Timestamp

This query get only 2 records and I can see it on the Preview... on the Transform Data Task.

Every time I execute the DTS it start running but get there for more than 10 minutes and never pass any data to the table.

Please can you help me with this.

Thank you in advance

Regards"

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-10-23 : 08:02:57
Is Timestamp column of data type DATETIME? If so, use
SELECT		x.* 
FROM blue.dbo.iApplicationStat x
WHERE x.Timestamp >= DATEADD(day, DATEDIFF(day, 1, GETDATE()), 0)
AND x.Timestamp < DATEADD(second, 960, DATEADD(day, DATEDIFF(day, 1, GETDATE()), 0))
AND x.ApplicationID = 1
ORDER BY x.Timestamp
instead.

Also, concatenation operator in SQL Server is + character, not double pipe characters.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -