Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sugar crm suctom字段sql选择错误_Sql_Sugarcrm - Fatal编程技术网

Sugar crm suctom字段sql选择错误

Sugar crm suctom字段sql选择错误,sql,sugarcrm,Sql,Sugarcrm,我在Accounts模块中添加了几个附加字段。还为详细搜索添加了相同的字段。一个字段是十进制,另一个文本是从下拉菜单填充的。在运行测试搜索后,一切看起来都很好。但不久前,我需要查看搜索中的所有项目。搜索是使用我新添加的字段作为参数进行的。您可能已经知道,sugar crm中的搜索只显示前20项。所以,在尝试访问另外20个项目后,我得到了一个空列表。 sugarcrm.log向我显示sql查询错误: 11/12/12 00:09:33 [6300][ca4960aa-6cce-065a-be1d-

我在Accounts模块中添加了几个附加字段。还为详细搜索添加了相同的字段。一个字段是十进制,另一个文本是从下拉菜单填充的。在运行测试搜索后,一切看起来都很好。但不久前,我需要查看搜索中的所有项目。搜索是使用我新添加的字段作为参数进行的。您可能已经知道,sugar crm中的搜索只显示前20项。所以,在尝试访问另外20个项目后,我得到了一个空列表。 sugarcrm.log向我显示sql查询错误:

11/12/12 00:09:33 [6300][ca4960aa-6cce-065a-be1d-4fa7b40db052][FATAL]  Query Failed:SELECT TOP 21 * FROM
(SELECT  ROW_NUMBER()
OVER (ORDER BY accounts.name) AS row_number,
accounts.id  ,
**accounts_cstm.print_srv_prov_c**, 
accounts.name , 
accounts.billing_address_city , 
accounts.billing_address_country , 
accounts.phone_office  , 
LTRIM(RTRIM(ISNULL(jt0.first_name,'')+N' '+ISNULL(jt0.last_name,'')))     assigned_user_name , 
jt0.created_by assigned_user_name_owner  , 
N'Users' assigned_user_name_mod, 
accounts.annual_revenue , 
accounts.account_type , 
**accounts_cstm.print_srv_prov_c** , 
accounts.assigned_user_id  
FROM accounts   
LEFT JOIN accounts_cstm ON accounts.id = accounts_cstm.id_c   
LEFT JOIN  users jt0 ON accounts.assigned_user_id=jt0.id AND jt0.deleted=0 AND jt0.deleted=0 
where ((accounts.account_type in (N'potencial_client') ) AND (     accounts_cstm.print_srv_prov_c in (N'itel'))) AND accounts.deleted=0 
) AS a
WHERE row_number > 20::: [Microsoft][SQL Server Native Client 10.0][SQL Server]The     column 'print_srv_prov_c' was specified multiple times for 'a'.
所有字段都是使用Studio工具添加的,源代码也完好无损。 发生sql错误,因为使用了两次列
accounts\u cstm.print\u srv\u prov\u c
。为什么会发生这种情况以及如何解决

我正在使用SugarCRM CE 6.4.4

链接到SugarCRM论坛