Author |
Topic |
rjhe22
Constraint Violating Yak Guru
283 Posts |
Posted - 2013-04-12 : 07:24:26
|
im creating an event log and am getting the following error Msg 102, Level 15, State 1, Line 8Incorrect syntax near ','.at this line "+(DT_STR,6,1252) DATEDIFF("ss",@[System::StartTime], GETDATE())+",any ideas why i copied it from a tutorial |
|
ahmeds08
Aged Yak Warrior
737 Posts |
Posted - 2013-04-12 : 07:34:19
|
try removing " " from "ss"mohammad.javeed.ahmed@gmail.com |
|
|
rjhe22
Constraint Violating Yak Guru
283 Posts |
Posted - 2013-04-12 : 07:37:45
|
hitried that and still the same error |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2013-04-12 : 07:38:49
|
is that the full statement?Jack Vamvas--------------------http://www.sqlserver-dba.com |
|
|
rjhe22
Constraint Violating Yak Guru
283 Posts |
Posted - 2013-04-12 : 10:06:58
|
no this is itINSERT INTO dbo.SSISLog (EventType,PackageName,TaskName EventCode,EventDescription,PackageDuration,ContainerDuration,InsertCount,UpdateCount,DeleteCount, Host)VALUES ( 'OnPostExecute', "'+ @[System::PackageName] + '", "'+ @[System::SourceName] + '", 0, ", "+(DT_STR,6,1252) DATEDIFF("ss",@[System::StartTime], GETDATE())+", "+(DT_STR,6,1252)DATEDIFF("ss",@[System::ContainerStartTime], GETDATE())+", "+(DT_STR,4,1252 )@[User::InsertCount] +", "+(DT_STR,4,1252 )@[User::UpdateCount] +", "+(DT_STR,4,1252 )@[User::DeleteCount] +", "'+@[System::MachineName] +'")" |
|
|
|
|
|