![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I would like to be able to pull daily main frame files into my SQL database on a daily basis. We have the code down in order to get the files from the mainframe, where we are struggling is with a DTS task to check and see if the file is for the previous day and then if it is, execute the code to bring the data into a table. We have a sproc that can mimic what the date part looks like in the source file: PRINT 'X' + RIGHT(CAST(DATEPART(YEAR, GETDATE()-1) AS VARCHAR),1) + CHAR(64 + DATEPART(MONTH, GETDATE()-1)) + replicate('0', 2-len(CAST(DATEPART(DAY, GETDATE()-1) AS VARCHAR))) + CAST(DATEPART(DAY, GETDATE()-1) AS VARCHAR) but now how do we check to see (what task could we use and how), if the results of this matches the date part in a filename and if so, pull only those files into our table? Thank you in advance for your help! Patrice |
![]() |
| Thread Tools | |
| Display Modes | |
| |