![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
SQL Server 2000 -- DTS Package Fails with error: Invalid procedure call or argument 'DATEDIFF'. This works in a view. Is there a better way to do this? What I am trying to do is transfer only yesterdays data (i.e., Now() -1) to a delimited text file. Function Main() IF (DATEADD(dd, 0, DATEDIFF(dd, 0, ServerTimeStamp)) = DATEADD(dd, 0, DATEDIFF(dd, 0, NOW())) - 1) THEN DTSDestination("ID") = DTSSource("ID") DTSDestination("Direction") = DTSSource("Direction") DTSDestination("ServerTimeStamp") = DTSSource("ServerTimeStamp") DTSDestination("Quality") = DTSSource("Quality") DTSDestination("Agency") = DTSSource("Agency") DTSDestination("LoggedOn") = DTSSource("LoggedOn") Main = DTSTransformStat_OK ELSE Main = DTSTransformStat_SkipRow END IF End Function Thank you for any help with this. RBollinger |
#3
| |||
| |||
|
|
SQL Server 2000 -- DTS Package Fails with error: Invalid procedure call or argument 'DATEDIFF'. This works in a view. Is there a better way to do this? What I am trying to do is transfer only yesterdays data (i.e., Now() -1) to a delimited text file. Function Main() IF (DATEADD(dd, 0, DATEDIFF(dd, 0, ServerTimeStamp)) = DATEADD(dd, 0, DATEDIFF(dd, 0, NOW())) - 1) THEN DTSDestination("ID") = DTSSource("ID") DTSDestination("Direction") = DTSSource("Direction") DTSDestination("ServerTimeStamp") = DTSSource("ServerTimeStamp") DTSDestination("Quality") = DTSSource("Quality") DTSDestination("Agency") = DTSSource("Agency") DTSDestination("LoggedOn") = DTSSource("LoggedOn") Main = DTSTransformStat_OK ELSE Main = DTSTransformStat_SkipRow END IF End Function Thank you for any help with this. RBollinger |
#4
| |||
| |||
|
|
SQL Server 2000 -- DTS Package Fails with error: Invalid procedure call or argument 'DATEDIFF'. This works in a view. Is there a better way to do this? What I am trying to do is transfer only yesterdays data (i.e., Now() -1) to a delimited text file. Function Main() IF (DATEADD(dd, 0, DATEDIFF(dd, 0, ServerTimeStamp)) = DATEADD(dd, 0, DATEDIFF(dd, 0, NOW())) - 1) THEN DTSDestination("ID") = DTSSource("ID") DTSDestination("Direction") = DTSSource("Direction") DTSDestination("ServerTimeStamp") = DTSSource("ServerTimeStamp") DTSDestination("Quality") = DTSSource("Quality") DTSDestination("Agency") = DTSSource("Agency") DTSDestination("LoggedOn") = DTSSource("LoggedOn") Main = DTSTransformStat_OK ELSE Main = DTSTransformStat_SkipRow END IF End Function Thank you for any help with this. RBollinger |
#5
| |||
| |||
|
|
SQL Server 2000 -- DTS Package Fails with error: Invalid procedure call or argument 'DATEDIFF'. This works in a view. Is there a better way to do this? What I am trying to do is transfer only yesterdays data (i.e., Now() -1) to a delimited text file. Function Main() IF (DATEADD(dd, 0, DATEDIFF(dd, 0, ServerTimeStamp)) = DATEADD(dd, 0, DATEDIFF(dd, 0, NOW())) - 1) THEN DTSDestination("ID") = DTSSource("ID") DTSDestination("Direction") = DTSSource("Direction") DTSDestination("ServerTimeStamp") = DTSSource("ServerTimeStamp") DTSDestination("Quality") = DTSSource("Quality") DTSDestination("Agency") = DTSSource("Agency") DTSDestination("LoggedOn") = DTSSource("LoggedOn") Main = DTSTransformStat_OK ELSE Main = DTSTransformStat_SkipRow END IF End Function Thank you for any help with this. RBollinger |
#6
| |||
| |||
|
|
SQL Server 2000 -- DTS Package Fails with error: Invalid procedure call or argument 'DATEDIFF'. This works in a view. Is there a better way to do this? What I am trying to do is transfer only yesterdays data (i.e., Now() -1) to a delimited text file. Function Main() IF (DATEADD(dd, 0, DATEDIFF(dd, 0, ServerTimeStamp)) = DATEADD(dd, 0, DATEDIFF(dd, 0, NOW())) - 1) THEN DTSDestination("ID") = DTSSource("ID") DTSDestination("Direction") = DTSSource("Direction") DTSDestination("ServerTimeStamp") = DTSSource("ServerTimeStamp") DTSDestination("Quality") = DTSSource("Quality") DTSDestination("Agency") = DTSSource("Agency") DTSDestination("LoggedOn") = DTSSource("LoggedOn") Main = DTSTransformStat_OK ELSE Main = DTSTransformStat_SkipRow END IF End Function Thank you for any help with this. RBollinger |
#7
| |||
| |||
|
|
SQL Server 2000 -- DTS Package Fails with error: Invalid procedure call or argument 'DATEDIFF'. This works in a view. Is there a better way to do this? What I am trying to do is transfer only yesterdays data (i.e., Now() -1) to a delimited text file. Function Main() IF (DATEADD(dd, 0, DATEDIFF(dd, 0, ServerTimeStamp)) = DATEADD(dd, 0, DATEDIFF(dd, 0, NOW())) - 1) THEN DTSDestination("ID") = DTSSource("ID") DTSDestination("Direction") = DTSSource("Direction") DTSDestination("ServerTimeStamp") = DTSSource("ServerTimeStamp") DTSDestination("Quality") = DTSSource("Quality") DTSDestination("Agency") = DTSSource("Agency") DTSDestination("LoggedOn") = DTSSource("LoggedOn") Main = DTSTransformStat_OK ELSE Main = DTSTransformStat_SkipRow END IF End Function Thank you for any help with this. RBollinger |
#8
| |||
| |||
|
|
SQL Server 2000 -- DTS Package Fails with error: Invalid procedure call or argument 'DATEDIFF'. This works in a view. Is there a better way to do this? What I am trying to do is transfer only yesterdays data (i.e., Now() -1) to a delimited text file. Function Main() IF (DATEADD(dd, 0, DATEDIFF(dd, 0, ServerTimeStamp)) = DATEADD(dd, 0, DATEDIFF(dd, 0, NOW())) - 1) THEN DTSDestination("ID") = DTSSource("ID") DTSDestination("Direction") = DTSSource("Direction") DTSDestination("ServerTimeStamp") = DTSSource("ServerTimeStamp") DTSDestination("Quality") = DTSSource("Quality") DTSDestination("Agency") = DTSSource("Agency") DTSDestination("LoggedOn") = DTSSource("LoggedOn") Main = DTSTransformStat_OK ELSE Main = DTSTransformStat_SkipRow END IF End Function Thank you for any help with this. RBollinger |
#9
| |||
| |||
|
|
SQL Server 2000 -- DTS Package Fails with error: Invalid procedure call or argument 'DATEDIFF'. This works in a view. Is there a better way to do this? What I am trying to do is transfer only yesterdays data (i.e., Now() -1) to a delimited text file. Function Main() IF (DATEADD(dd, 0, DATEDIFF(dd, 0, ServerTimeStamp)) = DATEADD(dd, 0, DATEDIFF(dd, 0, NOW())) - 1) THEN DTSDestination("ID") = DTSSource("ID") DTSDestination("Direction") = DTSSource("Direction") DTSDestination("ServerTimeStamp") = DTSSource("ServerTimeStamp") DTSDestination("Quality") = DTSSource("Quality") DTSDestination("Agency") = DTSSource("Agency") DTSDestination("LoggedOn") = DTSSource("LoggedOn") Main = DTSTransformStat_OK ELSE Main = DTSTransformStat_SkipRow END IF End Function Thank you for any help with this. RBollinger |
![]() |
| Thread Tools | |
| Display Modes | |
| |