When we try and run anything under "Common Searches" in workflow designer we get an error. I have opened a case with support, but while I try a million things with that can I ask a simple question, the syntax of this query looks wrong.
select top 500 * from ( select top 500 SI.search_id, instance_id, parent_instance_id, IWN.workflow_name, IRN.rule_name, version, IUN.user_name, SI.workflow_id, repository_name, server_name, entry_id, entry_name, entry_path, entry_guid, start_time, status_time, idle_time, status, has_errors, has_warnings, has_informations, BPI.bpi_name, BPI.bpi_status, BPI.bpi_due_date from search_instance SI left join search_entry SE on SI.search_id = SE.search_id and SE.is_starting_entry = 1 left join search_status SS on SI.search_id = SS.search_id left join search_rep SR on SR.repository_id = SE.repository_id left join index_workflow_name IWN on SI.workflow_id = IWN.workflow_id left join index_rule_name IRN on SI.workflow_rule = IRN.rule_name_id left join index_user_name IUN on SI.workflow_user = IUN.user_name_id left join bp_instance BPI on SI.search_id = BPI.bpi_id where SI.search_id > @search_id_1 and ( SS.status_time > @min_status_time_1 or SS.status_time is NULL) order by search_id asc union all select top 500 SI.search_id, instance_id, parent_instance_id, IWN.workflow_name, IRN.rule_name, version, IUN.user_name, SI.workflow_id, repository_name, server_name, entry_id, entry_name, entry_path, entry_guid, start_time, status_time, idle_time, status, has_errors, has_warnings, has_informations, BPI.bpi_name, BPI.bpi_status, BPI.bpi_due_date from search_instance_log SI left join search_entry_log SE on SI.search_id = SE.search_id and SE.is_starting_entry = 1 left join search_status_log SS on SI.search_id = SS.search_id left join search_rep SR on SR.repository_id = SE.repository_id left join index_workflow_name IWN on SI.workflow_id = IWN.workflow_id left join index_rule_name IRN on SI.workflow_rule = IRN.rule_name_id left join index_user_name IUN on SI.workflow_user = IUN.user_name_id left join bp_instance BPI on SI.search_id = BPI.bpi_id where SI.search_id > @search_id_2 and ( SS.status_time > @min_status_time_2 or SS.status_time is NULL) order by search_id asc ) t order by search_id asc
Well there is an error if I copy it into SQL manager which is "order by search_id ", that's the ambiguous column name. If I place SI. or one of the other tables in front of it, it works.
Could anyone else have a look at the query that their search runs and see if it runs the exact same query. I am trying to figure out if its an error in my install somehow. Or if for some reason my exact version of SQL doesn't like that syntax, but others would be fine with it.
I am running SQL 10.0.1600 (SQL 2008)
Thanks