i have created a DTS job to export data into Excel, something i have done many times with no problems.
however, with this job i am tearing my hair out coz everything seems OK but it will not work...
The job consists of 2 'Execute SQl tasks' to drop and create the table as below:
and
and then a 'transform data task' using the following query:
The Excel spreadsheet consists of one sheet titled 'MasterData'.
The first time i ran the package it worked fine, but on subsequent runs it completes OK and tells me how many rows have been copied but when i open the spreadsheet there is no data, just the column headings.
If i then insert a new worksheet, delete the existing sheet and rename the new sheet to 'MasterData' and re-run the job, the job completes and the data is copied. However next time it is run again no data.
This is really driving me mad .
Can anyone help?
Cheers, Craig
Si fractum non sit, noli id reficere
however, with this job i am tearing my hair out coz everything seems OK but it will not work...
The job consists of 2 'Execute SQl tasks' to drop and create the table as below:
Code:
drop table `MasterData$`
Code:
CREATE TABLE `MasterData$` (
`RECORDNUMBER` VarChar (255) ,
`DATE` DateTime ,
`MINRESP` VarChar (255) ,
`EXRESP` VarChar (255) ,
`NOTES` VarChar (255)
)
Code:
SELECT recordnumber, [date], minresp,exresp, notes
FROM incidents
WHERE (YEAR([date]) = YEAR(DATEADD(m, -1, GETDATE()))
AND MONTH([date]) = MONTH(DATEADD(m, -1, GETDATE())))
AND type LIKE 'u%'
AND minresp <>'999'
AND NOT minresp IS NULL
AND minresp <>''
AND cast(minresp as real) > 15.01
The Excel spreadsheet consists of one sheet titled 'MasterData'.
The first time i ran the package it worked fine, but on subsequent runs it completes OK and tells me how many rows have been copied but when i open the spreadsheet there is no data, just the column headings.
If i then insert a new worksheet, delete the existing sheet and rename the new sheet to 'MasterData' and re-run the job, the job completes and the data is copied. However next time it is run again no data.
This is really driving me mad .
Can anyone help?
Cheers, Craig
Si fractum non sit, noli id reficere