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 |
sgandhi
Posting Yak Master
115 Posts |
Posted - 2009-08-04 : 08:20:46
|
Hi, i have a SSIS package and in the Execute SQL Task, i am using an expression (SQLSTATEMENTSOURCE)"Insert into dbo.dataload_logging ([log_date],[package_name],[starttime],[executed_by] ,[status]) values('"+ (DT_WSTR,30) MONTH(GETDATE())+"-"+(DT_WSTR,30) DAY(GETDATE())+"-"+(DT_WSTR,30) YEAR(GETDATE())+"','" +@[System::PackageName]+"','"+ (DT_WSTR,30)@[System::StartTime]+"','"+ (DT_WSTR, 30)@[System::UserName]+"','Success')"When i execute this, it does what its meant to and inserts the correct data into the table.But when i add this to SSMS, and execute this as a SQL AGENT Job (after adding it to the library), the package executes but does not write anything to the table.C:\Program Files\Microsoft SQL Server\100\DTS\Binn\DTExec.exe /DTS "\MSDB\Web_Analytics_B2R\Loading_Web_Import_Tables" /SERVER DDIADWB2RDB1 /CHECKPOINTING OFF /REPORTING VI did try writing to an output file and this is what it says. But i thought an insert doesnt require a resultset. Code: 0xC00291E2 Source: Write SUCCEEDED Package to Log Execute SQL Task Description: There is an invalid number of result bindings returned for the ResultSetType: "ResultSetType_Rowset".Please help and thanks for your time |
|
|
|
|
|
|