{"id":1358942,"date":"2017-10-04T08:22:07","date_gmt":"2017-10-04T15:22:07","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/sql-errors-in-project-namimssql\/"},"modified":"2017-10-04T08:22:07","modified_gmt":"2017-10-04T15:22:07","slug":"sql-errors-in-project-namimssql","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/sql-errors-in-project-namimssql\/","title":{"rendered":"SQL errors in Project Nami\/MSSQL"},"content":{"rendered":"<p>I am trying to run The Events Calendar v4.6 on Project Nami v1.6.2, which uses WordPress v4.8.2. Project Nami uses MS SQL instead of MySQL. My install is hosted on Microsoft Azure. <\/p>\n<p>I have disabled all plugins except The Events Calendar, and switched to the latest version of the Twenty Fourteen Theme (also tried with with the 2016 theme). I have turned on WP_DEBUG and WP_DEBUG_DISPLAY in wp-config.php. I see one SQL error when viewing any page in the admin:<\/p>\n<pre><code>WordPress database error: [[Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Invalid column name &#039;wp_postmeta&#039;. Code - 207]\nSELECT DISTINCT wp_posts.*, CASE WHEN wp_posts.post_type = &#039;tribe_events&#039; THEN wp_postmeta.meta_value ELSE wp_posts.post_date END AS post_date , wp_posts.post_date FROM wp_posts LEFT JOIN wp_postmeta as wp_postmeta on wp_posts.ID = wp_postmeta.post_id AND wp_postmeta.meta_key = &#039;_EventStartDate&#039; WHERE 1=1 AND wp_posts.post_name = &#039;events&#039; AND wp_posts.post_type IN (&#039;post&#039;, &#039;page&#039;, &#039;attachment&#039;, &#039;tribe_events&#039;, &#039;tribe-ea-record&#039;) AND ((wp_posts.post_status = &#039;publish&#039; OR wp_posts.post_status = &#039;inherit&#039; OR wp_posts.post_status = &#039;private&#039;)) ORDER BY post_date, wp_postmeta DESC<\/code><\/pre>\n<p>If I go to the \u201cview all events\u201d page in the admin, I see a 2nd error as well:<\/p>\n<pre><code>WordPress database error: [[Microsoft][ODBC Driver 13 for SQL Server][SQL Server]ORDER BY items must appear in the select list if SELECT DISTINCT is specified. Code - 145]\nSELECT DISTINCT wp_posts.ID FROM wp_posts LEFT JOIN wp_postmeta as tribe_event_end_date ON ( wp_posts.ID = tribe_event_end_date.post_id AND tribe_event_end_date.meta_key = &#039;_EventEndDate&#039; ) LEFT JOIN wp_postmeta AS tribe_event_start_date ON wp_posts.ID = tribe_event_start_date.post_id AND tribe_event_start_date.meta_key = &#039;_EventStartDate&#039; WHERE 1=1 AND wp_posts.post_type = &#039;tribe_events&#039; AND ((wp_posts.post_status = &#039;tribe-ignored&#039;)) ORDER BY tribe_event_start_date.meta_value DESC, tribe_event_end_date.meta_value DESC, wp_posts.post_date DESC OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY<\/code><\/pre>\n<p>Can you advise on how to resolve these errors? <\/p>\n","protected":false},"template":"","class_list":["post-1358942","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SQL errors in Project Nami\/MSSQL -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/sql-errors-in-project-namimssql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL errors in Project Nami\/MSSQL -\" \/>\n<meta property=\"og:description\" content=\"I am trying to run The Events Calendar v4.6 on Project Nami v1.6.2, which uses WordPress v4.8.2. Project Nami uses MS SQL instead of MySQL. My install is hosted on Microsoft Azure. I have disabled all plugins except The Events Calendar, and switched to the latest version of the Twenty Fourteen Theme (also tried with [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/sql-errors-in-project-namimssql\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/sql-errors-in-project-namimssql\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/sql-errors-in-project-namimssql\/\",\"name\":\"SQL errors in Project Nami\/MSSQL -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2017-10-04T15:22:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/sql-errors-in-project-namimssql\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/sql-errors-in-project-namimssql\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/sql-errors-in-project-namimssql\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"SQL errors in Project Nami\/MSSQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SQL errors in Project Nami\/MSSQL -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/sql-errors-in-project-namimssql\/","og_locale":"en_US","og_type":"article","og_title":"SQL errors in Project Nami\/MSSQL -","og_description":"I am trying to run The Events Calendar v4.6 on Project Nami v1.6.2, which uses WordPress v4.8.2. Project Nami uses MS SQL instead of MySQL. My install is hosted on Microsoft Azure. I have disabled all plugins except The Events Calendar, and switched to the latest version of the Twenty Fourteen Theme (also tried with [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/sql-errors-in-project-namimssql\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/sql-errors-in-project-namimssql\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/sql-errors-in-project-namimssql\/","name":"SQL errors in Project Nami\/MSSQL -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2017-10-04T15:22:07+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/sql-errors-in-project-namimssql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/sql-errors-in-project-namimssql\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/sql-errors-in-project-namimssql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"SQL errors in Project Nami\/MSSQL"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1358942","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1358942\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1358942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}