SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 event log error
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

rjhe22
Constraint Violating Yak Guru

254 Posts

Posted - 04/12/2013 :  07:24:26  Show Profile  Reply with Quote
im creating an event log and am getting the following error
Msg 102, Level 15, State 1, Line 8
Incorrect 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

India
655 Posts

Posted - 04/12/2013 :  07:34:19  Show Profile  Send ahmeds08 a Yahoo! Message  Reply with Quote
try removing " " from "ss"

mohammad.javeed.ahmed@gmail.com
Go to Top of Page

rjhe22
Constraint Violating Yak Guru

254 Posts

Posted - 04/12/2013 :  07:37:45  Show Profile  Reply with Quote
hi
tried that and still the same error
Go to Top of Page

jackv
Flowing Fount of Yak Knowledge

United Kingdom
2067 Posts

Posted - 04/12/2013 :  07:38:49  Show Profile  Visit jackv's Homepage  Reply with Quote
is that the full statement?

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

rjhe22
Constraint Violating Yak Guru

254 Posts

Posted - 04/12/2013 :  10:06:58  Show Profile  Reply with Quote
no this is it
INSERT 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] +'"
)
"
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000