Hi All, I am getting below error when i m trying to automate a process... my first step in automation is to run a script.. its running perfectly fine when done manually but when i am using automation tab it gives below error- (I m using Toad 7 for MYSQL windows 7) System.ArgumentOutOfRangeException Count must be positive and count must refer to a location within the string/array/collection. Parameter name: count Stack Trace: at System.String.IndexOfAny(Char[] anyOf, Int32 startIndex, Int32 count) at Quest.Toad.Automation.BindVariableCheck.RemoveBindChar(String varName) at Quest.Toad.Automation.BindVariableCheck.CheckForUndefinedVarsSql(Activity act, String sql, String connectionType) at Quest.Toad.Automation.BindVariableCheck.CheckForTotalUndefinedVars(Activity act, String sql, String connectionType) at Quest.Toad.Workflow.Activities.Database.SelectDataActivityValidator.Validate(ValidationManager manager, Object obj) at Quest.Toad.Workflow.UI.Designer.ValidateCurrentActivity() at Quest.Toad.Automation.AutomationForm.ValidateCurrentActivity() at Quest.Toad.Workflow.Activities.BaseEntryControl.UpdateActivity() at Quest.Toad.Workflow.Activities.Database.SelectDataEntryControl.UpdateProperties(String sql, String sqlFile, Boolean linkFile) at Quest.Toad.Workflow.Activities.BaseSQLEntryControl1.ecSqlText_IntervalExpired(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Windows.Forms.Control.OnLeave(EventArgs e) at System.Windows.Forms.Control.NotifyLeave() at System.Windows.Forms.ContainerControl.UpdateFocusedControl() My code is SELECT ox_data_stats_x_x_t_x.country_id, concat(zone_type, '&', ad_type) AS zonead, SUM( if( date_time = date_format(date_sub(now(), INTERVAL 1 MONTH), '%Y-%m-01 00:00:00') AND date_time = date_format( LAST_DAY(date_sub(now(), INTERVAL 1 MONTH)), '%Y-%m-%d 00:00:00'), ox_data_stats_x_x_t_x.total_cost, 0)) / day(last_day(date_sub(now(), INTERVAL 1 MONTH))) AS Last_Month, SUM( IF( date_time = date_format(date_sub(now(), INTERVAL 1 DAY), '%Y-%m-01 00:00:00') AND date_time = date_format(date_sub(now(), INTERVAL 1 DAY), '%Y-%m-%d 00:00:00'), ox_data_stats_x_x_t_x.total_cost, 0)) / day(date_sub(now(), INTERVAL 1 DAY)) AS This_Month, sum( if( date_time = DATE_FORMAT( adddate(curdate(), INTERVAL -5 - DAYOFWEEK(curdate()) DAY), '%Y-%m-%d 00:00:00') AND date_time = DATE_FORMAT( adddate(curdate(), INTERVAL 1 - DAYOFWEEK(curdate()) DAY), '%Y-%m-%d 00:00:00'), ox_data_stats_x_x_t_x.total_cost, 0)) / 7 AS Last_Week, SUM( IF( date_time = date_format(date_sub(now(), INTERVAL 1 DAY), '%Y-%m-%d 00:00:00'), ox_data_stats_x_x_t_x.total_cost, 0)) AS Yesterday, SUM( IF( date_time = date_format(date_sub(now(), INTERVAL 2 DAY), '%Y-%m-%d 00:00:00'), ox_data_stats_x_x_t_x.total_cost, 0)) AS Day_before_yesterday, SUM( IF( date_time = date_format(date_sub(now(), INTERVAL 3 DAY), '%Y-%m-%d 00:00:00'), ox_data_stats_x_x_t_x.total_cost, 0)) AS Minus_three, ox_data_stats_x_x_t_x.agency_id FROM vserv.ox_data_stats_x_x_t_x ox_data_stats_x_x_t_x WHERE (ox_data_stats_x_x_t_x.agency_id = 3) AND ( ox_data_stats_x_x_t_x.date_time = date_format(date_sub(now(), INTERVAL 1 MONTH), '%Y-%m-01 00:00:00') AND ox_data_stats_x_x_t_x.date_time = date_format(date_sub(now(), INTERVAL 1 DAY), '%Y-%m-%d 00:00:00')) GROUP BY ox_data_stats_x_x_t_x.country_id, concat(zone_type, '&', ad_type)
↧