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.
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 1Here is the query on the Transform Data Task:SELECT * FROM blue.dbo.iApplicationStatWHERE Timestamp BETWEEN datename(year, (DATEADD(day, -1, getdate()))) || '-' || datename(month, (DATEADD(day, -1, getdate()))) || '-' || datename(day, (DATEADD(day, -1, getdate()))) || ' 00:00:00' ANDdatename(year, (DATEADD(day, -1, getdate()))) || '-' || datename(month, (DATEADD(day, -1, getdate()))) || '-' || datename(day, (DATEADD(day, -1, getdate()))) || ' 00:15:59' ANDApplicationID = 1ORDER BY TimestampThis 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 advanceRegards" |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-10-23 : 08:02:57
|
Is Timestamp column of data type DATETIME? If so, useSELECT x.* FROM blue.dbo.iApplicationStat xWHERE 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 = 1ORDER BY x.Timestamp instead.Also, concatenation operator in SQL Server is + character, not double pipe characters.Peter LarssonHelsingborg, Sweden |
|
|
|
|
|
|
|