{"action":"closed","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/6054","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6054/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6054/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6054/events","html_url":"https://github.com/joomla/joomla-cms/issues/6054","id":57306675,"number":6054,"title":"SQL Errors in com_search whit MSSQL.","user":{"login":"vzenix","id":10544326,"avatar_url":"https://avatars.githubusercontent.com/u/10544326?v=3","gravatar_id":"","url":"https://api.github.com/users/vzenix","html_url":"https://github.com/vzenix","followers_url":"https://api.github.com/users/vzenix/followers","following_url":"https://api.github.com/users/vzenix/following{/other_user}","gists_url":"https://api.github.com/users/vzenix/gists{/gist_id}","starred_url":"https://api.github.com/users/vzenix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vzenix/subscriptions","organizations_url":"https://api.github.com/users/vzenix/orgs","repos_url":"https://api.github.com/users/vzenix/repos","events_url":"https://api.github.com/users/vzenix/events{/privacy}","received_events_url":"https://api.github.com/users/vzenix/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/No%20Code%20Attached%20Yet","name":"No Code Attached Yet","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-02-11T11:53:58Z","updated_at":"2015-02-14T23:18:27Z","closed_at":"2015-02-14T23:18:26Z","body":"#### Steps to reproduce the issue\r\nGo to: /index.php?searchword=tag&ordering=newest&searchphrase=all&option=com_search\r\n\r\n#### Expected result\r\nSearch Results.\r\n\r\n#### Actual result\r\n[Microsoft][SQL Server Native Client 11.0][SQL Server] Column 'yawcx_contact_details.name' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. SQL=SELECT * FROM ( SELECT a.name AS title, '' AS created, a.con_position, a.misc, CASE WHEN DATALENGTH(a.alias) != 0 THEN (CAST(a.id as NVARCHAR(10))+':'+a.alias) ELSE CAST(a.id as NVARCHAR(10)) END as slug, CASE WHEN DATALENGTH(c.alias) != 0 THEN (CAST(c.id as NVARCHAR(10))+':'+c.alias) ELSE CAST(c.id as NVARCHAR(10)) END as catslug, (a.name+','+a.con_position+','+a.misc) AS text,('Contacts'+' / '+c.title) AS section,'2' AS browsernav , ROW_NUMBER() OVER (ORDER BY a.name DESC) AS RowNumber FROM yawcx_contact_details AS a INNER JOIN yawcx_categories AS c ON c.id = a.catid WHERE (a.name LIKE '%tag%' OR a.misc LIKE '%tag%' OR a.con_position LIKE '%tag%' OR a.address LIKE '%tag%' OR a.suburb LIKE '%tag%' OR a.state LIKE '%tag%' OR a.country LIKE '%tag%' OR a.postcode LIKE '%tag%' OR a.telephone LIKE '%tag%' OR a.fax LIKE '%tag%') AND a.published IN (1,2) AND c.published=1 AND a.access IN (1,1,2) AND c.access IN (1,1,2) GROUP BY a.id, a.con_position, a.misc, c.alias, c.id ) _myResults WHERE RowNumber BETWEEN 1 AND 50\r\n\r\n[Microsoft][SQL Server Native Client 11.0][SQL Server]The column 'note' was specified multiple times for '_myResults'. SQL=SELECT * FROM ( SELECT a.id, a.title, a.alias, a.note, a.published, a.access, a.checked_out, a.checked_out_time, a.created_user_id, a.path, a.parent_id, a.level, a.lft, a.rgt, a.language, a.created_time AS created, a.note, a.description, CASE WHEN DATALENGTH(a.alias) != 0 THEN (CAST(a.id as NVARCHAR(10))+':'+a.alias) ELSE CAST(a.id as NVARCHAR(10)) END as slug , ROW_NUMBER() OVER (ORDER BY a.created_time DESC) AS RowNumber FROM yawcx_tags AS a WHERE a.alias <> 'root' AND (a.title LIKE '%tag%' OR a.alias LIKE '%tag%') AND a.access IN (1,1,2) ) _myResults WHERE RowNumber BETWEEN 1 AND 50\r\n\r\n#### System information (as much as possible)\r\nIIS\r\nMSSQL\r\nJoomla 3.3.6\r\n\r\n#### Additional comments\r\n1º Error: Add in group clausule a.name, a.alias, c.title because GROUP BY is diferent in MySQL.\r\n(/plugin/search/contacts/contacts.php)\r\n2º Error: Delete 'a.note', because have 2 in \"SELECT\" and this can provoke a crash in MSSQL.\r\n(/plugin/search/tags/tags.php)\r\n"}}