# SQL "Query processor" error

**URL:** <https://community.thinkgeo.com/t/sql-query-processor-error/1986>\
**Category:** WinForms\
**Created:** [May 30, 2012, 12:38pm UTC](https://community.thinkgeo.com/t/sql-query-processor-error/1986 "2012-05-30T12:38:03Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@Allen](https://community.thinkgeo.com/u/Allen)\
**Post date:** [May 30, 2012, 12:38pm UTC](https://community.thinkgeo.com/t/sql-query-processor-error/1986/1 "2012-05-30T12:38:03Z")

</div>

Good&nbsp;afternoon...

I&nbsp;am&nbsp;beginning&nbsp;the&nbsp;upgrade&nbsp;of&nbsp;our&nbsp;application&nbsp;to&nbsp;MapSuite&nbsp;6.0.&nbsp;&nbsp;When&nbsp;calling&nbsp;winformsMap1.Refresh()&nbsp;I&nbsp;am&nbsp;getting&nbsp;this&nbsp;error&nbsp;from&nbsp;SQL&nbsp;Server:

The&nbsp;query&nbsp;processor&nbsp;could&nbsp;not&nbsp;produce&nbsp;a&nbsp;query&nbsp;plan&nbsp;for&nbsp;a&nbsp;query&nbsp;with&nbsp;a&nbsp;spatial&nbsp;index&nbsp;hint.&nbsp;&nbsp;Reason:&nbsp;Could&nbsp;not&nbsp;find&nbsp;required&nbsp;comparison&nbsp;predicate.&nbsp;&nbsp;Try&nbsp;removing&nbsp;the&nbsp;index&nbsp;hints&nbsp;or&nbsp;removing&nbsp;SET&nbsp;FORCEPLAN.

When&nbsp;I&nbsp;run&nbsp;the&nbsp;current&nbsp;version&nbsp;of&nbsp;the&nbsp;application&nbsp;(using&nbsp;MapSuite&nbsp;4.5)&nbsp;I&nbsp;do&nbsp;not&nbsp;get&nbsp;this&nbsp;error.&nbsp;&nbsp;This&nbsp;computer&nbsp;is&nbsp;Windows&nbsp;7,&nbsp;running&nbsp;SQL&nbsp;Server&nbsp;2008&nbsp;R2&nbsp;Developer&nbsp;edition.

Has&nbsp;anyone&nbsp;seen&nbsp;this&nbsp;before?

Thanks,

Allen

---

<div class="post-metadata">

**Author:** ![Allen](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@Allen](https://community.thinkgeo.com/u/Allen)\
**Post date:** [May 31, 2012, 7:01am UTC](https://community.thinkgeo.com/t/sql-query-processor-error/1986/2 "2012-05-31T07:01:58Z")

</div>

A&nbsp;little&nbsp;more&nbsp;info…&nbsp;  
&nbsp;&nbsp;  
&nbsp;To&nbsp;repeat:&nbsp;I&nbsp;am&nbsp;converting&nbsp;code&nbsp;that&nbsp;uses&nbsp;MapSuite&nbsp;4.5&nbsp;to&nbsp;6.0.&nbsp;&nbsp;This&nbsp;code&nbsp;has&nbsp;been&nbsp;running&nbsp;at&nbsp;customer&nbsp;locations&nbsp;for&nbsp;almost&nbsp;a&nbsp;year.&nbsp;  
&nbsp;&nbsp;  
&nbsp;We&nbsp;have&nbsp;a&nbsp;class&nbsp;that&nbsp;creates&nbsp;a&nbsp;MapSuite&nbsp;Overlay&nbsp;from&nbsp;an&nbsp;XML&nbsp;document.&nbsp;&nbsp;This&nbsp;XML&nbsp;document&nbsp;defines&nbsp;all&nbsp;the&nbsp;tables,&nbsp;styling&nbsp;info,&nbsp;etc.&nbsp;&nbsp;When&nbsp;I&nbsp;test&nbsp;this&nbsp;with&nbsp;MapSuite&nbsp;6.0,&nbsp;it&nbsp;works.&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;We&nbsp;have&nbsp;a&nbsp;user&nbsp;component&nbsp;that&nbsp;encapsulates&nbsp;WinFormsMap&nbsp;functionality&nbsp;so&nbsp;that&nbsp;map&nbsp;operations&nbsp;are&nbsp;done&nbsp;in&nbsp;the&nbsp;component&nbsp;on&nbsp;behalf&nbsp;of&nbsp;the&nbsp;application&nbsp;rather&nbsp;than&nbsp;by&nbsp;the&nbsp;application&nbsp;talking&nbsp;directly&nbsp;to&nbsp;MapSuite.&nbsp;When&nbsp;the&nbsp;test&nbsp;program&nbsp;for&nbsp;this&nbsp;component&nbsp;loads&nbsp;a&nbsp;map,&nbsp;it&nbsp;loads&nbsp;the&nbsp;overlay&nbsp;described&nbsp;above&nbsp;(all&nbsp;of&nbsp;data&nbsp;from&nbsp;it&nbsp;is&nbsp;coming&nbsp;from&nbsp;SQL&nbsp;Server)&nbsp;plus&nbsp;creates&nbsp;new&nbsp;overlays&nbsp;with&nbsp;InMemoryLayers&nbsp;and&nbsp;MsSql2008FeatureLayers&nbsp;fortesting&nbsp;various&nbsp;application&nbsp;functions.&nbsp;&nbsp;This&nbsp;is&nbsp;the&nbsp;application&nbsp;that&nbsp;fails&nbsp;on&nbsp;Refresh().&nbsp;&nbsp;So&nbsp;it&nbsp;seems&nbsp;to&nbsp;me&nbsp;that&nbsp;something&nbsp;that’s&nbsp;being&nbsp;added&nbsp;to&nbsp;the&nbsp;map&nbsp;in&nbsp;this&nbsp;test&nbsp;program&nbsp;that&nbsp;our&nbsp;overlay&nbsp;creation&nbsp;class&nbsp;doesn’t&nbsp;do&nbsp;is&nbsp;what’s&nbsp;causing&nbsp;the&nbsp;error.&nbsp;&nbsp;I&nbsp;am&nbsp;hopeful&nbsp;I&nbsp;can&nbsp;comment&nbsp;out&nbsp;code&nbsp;and&nbsp;isolate&nbsp;where&nbsp;the&nbsp;problematic&nbsp;code&nbsp;is.&nbsp;&nbsp;Again,&nbsp;this&nbsp;EXACT&nbsp;CODE&nbsp;works&nbsp;(and&nbsp;has&nbsp;worked&nbsp;for&nbsp;almost&nbsp;1-1/2&nbsp;years)&nbsp;under&nbsp;MapSuite&nbsp;4.5&nbsp;but&nbsp;does&nbsp;not&nbsp;work&nbsp;under&nbsp;MapSuite&nbsp;6.0.&nbsp;Something&nbsp;in&nbsp;the&nbsp;back&nbsp;of&nbsp;my&nbsp;brain&nbsp;is&nbsp;telling&nbsp;me&nbsp;the&nbsp;problem&nbsp;is&nbsp;with&nbsp;an&nbsp;empty&nbsp;layer&nbsp;not&nbsp;playing&nbsp;nicely&nbsp;with&nbsp;some&nbsp;change&nbsp;that&nbsp;has&nbsp;been&nbsp;made&nbsp;between&nbsp;MapSuite&nbsp;4.5&nbsp;and&nbsp;6.0&nbsp;with&nbsp;how&nbsp;it&nbsp;interacts&nbsp;with&nbsp;SQL&nbsp;Server.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Also,&nbsp;I&nbsp;took&nbsp;the&nbsp;code&nbsp;using&nbsp;MapSuite&nbsp;6.0&nbsp;to&nbsp;my&nbsp;old&nbsp;Windows&nbsp;XP&nbsp;computer,&nbsp;which&nbsp;is&nbsp;running&nbsp;SQL&nbsp;Server&nbsp;2008&nbsp;R2&nbsp;Express,&nbsp;and&nbsp;the&nbsp;MapSuite&nbsp;6.0&nbsp;update&nbsp;still&nbsp;fails,&nbsp;so&nbsp;it&nbsp;is&nbsp;not&nbsp;the&nbsp;SQL&nbsp;Server&nbsp;2008&nbsp;R2&nbsp;Developer&nbsp;edition&nbsp;on&nbsp;my&nbsp;new&nbsp;computer.&nbsp;&nbsp;That&nbsp;eliminates&nbsp;operating&nbsp;system&nbsp;and&nbsp;SQL&nbsp;Server&nbsp;version&nbsp;variables.&nbsp;  
&nbsp;&nbsp;  
&nbsp;In&nbsp;the&nbsp;past&nbsp;there&nbsp;have&nbsp;been&nbsp;a&nbsp;number&nbsp;of&nbsp;others&nbsp;out&nbsp;there&nbsp;using&nbsp;MapSuite&nbsp;and&nbsp;SQL&nbsp;Server…I&nbsp;wonder&nbsp;if&nbsp;they’re&nbsp;still&nbsp;around&nbsp;and&nbsp;have&nbsp;upgraded&nbsp;as&nbsp;well.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Allen

---

<div class="post-metadata">

**Author:** ![Allen](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@Allen](https://community.thinkgeo.com/u/Allen)\
**Post date:** [May 31, 2012, 8:15am UTC](https://community.thinkgeo.com/t/sql-query-processor-error/1986/3 "2012-05-31T08:15:53Z")

</div>

Ok,&nbsp;I’ve&nbsp;narrowed&nbsp;this&nbsp;down&nbsp;to&nbsp;a&nbsp;single&nbsp;line&nbsp;of&nbsp;code.&nbsp;  
&nbsp;&nbsp;  
&nbsp;After&nbsp;I&nbsp;use&nbsp;the&nbsp;overlay&nbsp;class&nbsp;to&nbsp;load&nbsp;the&nbsp;tables&nbsp;from&nbsp;SQL&nbsp;Server,&nbsp;I&nbsp;create&nbsp;a&nbsp;new&nbsp;Overlay&nbsp;for&nbsp;layers&nbsp;that&nbsp;will&nbsp;store&nbsp;features&nbsp;that&nbsp;the&nbsp;user&nbsp;can&nbsp;edit.&nbsp;&nbsp;This&nbsp;second&nbsp;overlay&nbsp;contains&nbsp;two&nbsp;MsSql2008FeatureLayers&nbsp;and&nbsp;one&nbsp;MapShapeLayer.&nbsp;&nbsp;When&nbsp;the&nbsp;first&nbsp;SQL&nbsp;layer&nbsp;isn’t&nbsp;added&nbsp;to&nbsp;the&nbsp;overlay,&nbsp;the&nbsp;error&nbsp;does&nbsp;not&nbsp;occur,&nbsp;so&nbsp;I&nbsp;narrowed&nbsp;it&nbsp;down&nbsp;to&nbsp;one&nbsp;layer&nbsp;SQL&nbsp;layer.&nbsp;&nbsp;This&nbsp;first&nbsp;SQL&nbsp;layer&nbsp;also&nbsp;has&nbsp;a&nbsp;WHERECLAUSE&nbsp;defined.&nbsp;&nbsp;When&nbsp;the&nbsp;WHERECLAUSE&nbsp;is&nbsp;removed,&nbsp;the&nbsp;error&nbsp;doesn’t&nbsp;occur!&nbsp;&nbsp;When&nbsp;I&nbsp;put&nbsp;the&nbsp;WHERECLAUSE&nbsp;back&nbsp;in,&nbsp;the&nbsp;error&nbsp;comes&nbsp;back.&nbsp;&nbsp;So&nbsp;it&nbsp;looks&nbsp;like&nbsp;something&nbsp;has&nbsp;changed&nbsp;in&nbsp;MapSuite&nbsp;6.0&nbsp;where&nbsp;a&nbsp;WHERECLAUSE&nbsp;applied&nbsp;to&nbsp;an&nbsp;empty&nbsp;SQL&nbsp;layer&nbsp;causes&nbsp;this&nbsp;error&nbsp;when&nbsp;the&nbsp;map&nbsp;is&nbsp;refreshed.&nbsp;  
&nbsp;&nbsp;  
&nbsp;This&nbsp;WHERECLAUSE&nbsp;filters&nbsp;the&nbsp;items&nbsp;in&nbsp;the&nbsp;layer&nbsp;based&nbsp;on&nbsp;a&nbsp;data&nbsp;range&nbsp;because&nbsp;the&nbsp;items&nbsp;in&nbsp;the&nbsp;layer&nbsp;(when&nbsp;loaded)&nbsp;can&nbsp;be&nbsp;expired&nbsp;based&nbsp;on&nbsp;a&nbsp;date&nbsp;in&nbsp;the&nbsp;table.

---

<div class="post-metadata">

**Author:** ![Allen](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@Allen](https://community.thinkgeo.com/u/Allen)\
**Post date:** [May 31, 2012, 9:11am UTC](https://community.thinkgeo.com/t/sql-query-processor-error/1986/4 "2012-05-31T09:11:26Z")

</div>

I&nbsp;have&nbsp;narrowed&nbsp;this&nbsp;down&nbsp;to&nbsp;an&nbsp;issue&nbsp;with&nbsp;the&nbsp;query…&nbsp;  
&nbsp;&nbsp;  
&nbsp;Our&nbsp;original&nbsp;WHERECLAUSE&nbsp;is&nbsp;this:&nbsp;  
&nbsp;&nbsp;  
&nbsp;WHERE&nbsp;PERMANENT=1&nbsp;OR&nbsp;(STARTDATE&nbsp;\<&nbsp;SysDateTime()&nbsp;AND&nbsp;ENDDATE&nbsp;\>&nbsp;SysDateTime())&nbsp;  
&nbsp;&nbsp;  
&nbsp;which&nbsp;causes&nbsp;the&nbsp;error.&nbsp;  
&nbsp;&nbsp;  
&nbsp;If&nbsp;I&nbsp;just&nbsp;do&nbsp;"WHERE&nbsp;PERMANENT=1"&nbsp;I&nbsp;do&nbsp;not&nbsp;get&nbsp;the&nbsp;error.&nbsp;  
&nbsp;&nbsp;  
&nbsp;However,&nbsp;if&nbsp;I&nbsp;make&nbsp;the&nbsp;WHERECLAUSE&nbsp;this:&nbsp;  
&nbsp;&nbsp;  
&nbsp;WHERE&nbsp;PERMANENT=1&nbsp;OR&nbsp;PERMANENT=1&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;get&nbsp;the&nbsp;error&nbsp;but&nbsp;if&nbsp;I&nbsp;do&nbsp;this&nbsp;  
&nbsp;&nbsp;  
&nbsp;WHERE&nbsp;PERMANENT=1&nbsp;AND&nbsp;PERMANENT=1&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;do&nbsp;not.&nbsp;&nbsp;It&nbsp;is&nbsp;DEFINITELY&nbsp;THE&nbsp;"OR"&nbsp;because&nbsp;if&nbsp;I&nbsp;do&nbsp;this&nbsp;  
&nbsp;&nbsp;  
&nbsp;WHERE&nbsp;1=1&nbsp;AND&nbsp;1=1&nbsp;  
&nbsp;&nbsp;  
&nbsp;there&nbsp;is&nbsp;no&nbsp;error&nbsp;but&nbsp;this&nbsp;  
&nbsp;&nbsp;  
&nbsp;WHERE&nbsp;1=1&nbsp;OR&nbsp;1=1&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;still&nbsp;causes&nbsp;the&nbsp;error.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Hopefully&nbsp;now&nbsp;someone&nbsp;can&nbsp;look&nbsp;into&nbsp;this!&nbsp;  
&nbsp;&nbsp;  
&nbsp;Allen

---

<div class="post-metadata">

**Author:** ![Allen](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@Allen](https://community.thinkgeo.com/u/Allen)\
**Post date:** [May 31, 2012, 10:31am UTC](https://community.thinkgeo.com/t/sql-query-processor-error/1986/5 "2012-05-31T10:31:41Z")

</div>

I&nbsp;think&nbsp;I’ve&nbsp;gone&nbsp;about&nbsp;as&nbsp;far&nbsp;as&nbsp;I&nbsp;can&nbsp;with&nbsp;this…we’ve&nbsp;submitted&nbsp;a&nbsp;support&nbsp;ticket&nbsp;for&nbsp;this&nbsp;issue.

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [May 31, 2012, 11:42am UTC](https://community.thinkgeo.com/t/sql-query-processor-error/1986/6 "2012-05-31T11:42:41Z")

</div>

Hello&nbsp;Allen,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;post&nbsp;and&nbsp;ticket,&nbsp;we&nbsp;are&nbsp;working&nbsp;on&nbsp;this&nbsp;and&nbsp;will&nbsp;let&nbsp;you&nbsp;know&nbsp;the&nbsp;result&nbsp;as&nbsp;soon&nbsp;as&nbsp;possible.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Gary

---

<div class="post-metadata">

**Author:** ![Allen](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@Allen](https://community.thinkgeo.com/u/Allen)\
**Post date:** [May 31, 2012, 12:12pm UTC](https://community.thinkgeo.com/t/sql-query-processor-error/1986/7 "2012-05-31T12:12:54Z")

</div>

Hi&nbsp;Gary,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Great!&nbsp;&nbsp;I&nbsp;know&nbsp;in&nbsp;theory&nbsp;I&nbsp;can&nbsp;probably&nbsp;rework&nbsp;the&nbsp;query&nbsp;to&nbsp;get&nbsp;the&nbsp;“OR”&nbsp;out&nbsp;of&nbsp;the&nbsp;WHERECLAUSE&nbsp;but&nbsp;customers&nbsp;can&nbsp;create&nbsp;their&nbsp;own&nbsp;XML&nbsp;documents&nbsp;to&nbsp;style&nbsp;the&nbsp;map&nbsp;the&nbsp;way&nbsp;they&nbsp;want&nbsp;and&nbsp;to&nbsp;load&nbsp;custom&nbsp;data,&nbsp;and&nbsp;since&nbsp;we&nbsp;support&nbsp;the&nbsp;WHERECLAUSE&nbsp;in&nbsp;the&nbsp;XML&nbsp;for&nbsp;filtering&nbsp;purposes&nbsp;we&nbsp;probably&nbsp;can’t&nbsp;tell&nbsp;customers&nbsp;to&nbsp;not&nbsp;use&nbsp;“OR”&nbsp;in&nbsp;their&nbsp;statement!&nbsp;&nbsp;(Loading&nbsp;a&nbsp;SQL&nbsp;layer&nbsp;from&nbsp;their&nbsp;XML&nbsp;style&nbsp;file&nbsp;eventually&nbsp;translates&nbsp;to&nbsp;the&nbsp;same&nbsp;type&nbsp;of&nbsp;code&nbsp;where&nbsp;I&nbsp;came&nbsp;across&nbsp;this&nbsp;issue,&nbsp;so&nbsp;we&nbsp;are&nbsp;presuming&nbsp;they&nbsp;would&nbsp;encounter&nbsp;the&nbsp;error&nbsp;as&nbsp;well.)&nbsp;  
&nbsp;&nbsp;  
&nbsp;This&nbsp;is&nbsp;part&nbsp;of&nbsp;a&nbsp;rather&nbsp;large&nbsp;application,&nbsp;but&nbsp;I’m&nbsp;going&nbsp;to&nbsp;guess&nbsp;creating&nbsp;an&nbsp;overlay&nbsp;and&nbsp;adding&nbsp;a&nbsp;single&nbsp;SQL&nbsp;layer&nbsp;with&nbsp;the&nbsp;proper&nbsp;WHERECLAUSE&nbsp;will&nbsp;duplicate&nbsp;the&nbsp;error.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Allen

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [May 31, 2012, 3:21pm UTC](https://community.thinkgeo.com/t/sql-query-processor-error/1986/8 "2012-05-31T15:21:51Z")

</div>

Hello&nbsp;Allen,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;information,&nbsp;we&nbsp;have&nbsp;recreated&nbsp;this&nbsp;problem&nbsp;and&nbsp;create&nbsp;an&nbsp;issue&nbsp;for&nbsp;this,&nbsp;once&nbsp;our&nbsp;product&nbsp;team&nbsp;find&nbsp;out&nbsp;the&nbsp;root&nbsp;cause&nbsp;and&nbsp;resolve&nbsp;the&nbsp;problem,&nbsp;I&nbsp;will&nbsp;post&nbsp;in&nbsp;the&nbsp;ticket&nbsp;to&nbsp;let&nbsp;you&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Gary

---

<div class="post-metadata">

**Author:** ![Allen](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@Allen](https://community.thinkgeo.com/u/Allen)\
**Post date:** [May 31, 2012, 5:42pm UTC](https://community.thinkgeo.com/t/sql-query-processor-error/1986/9 "2012-05-31T17:42:59Z")

</div>

Gary,&nbsp;  
&nbsp;&nbsp;  
&nbsp;It&nbsp;is&nbsp;SO&nbsp;GOOD&nbsp;to&nbsp;hear&nbsp;you&nbsp;were&nbsp;able&nbsp;to&nbsp;reproduce&nbsp;the&nbsp;issue&nbsp;that&nbsp;easily.&nbsp;&nbsp;It&nbsp;doesn’t&nbsp;always&nbsp;work&nbsp;that&nbsp;way!&nbsp;&nbsp;I&nbsp;look&nbsp;forward&nbsp;to&nbsp;getting&nbsp;it&nbsp;fixed&nbsp;and&nbsp;returning&nbsp;to&nbsp;my&nbsp;MapSuite&nbsp;4.5&nbsp;to&nbsp;6.0&nbsp;update.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;Allen

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [June 1, 2012, 2:07pm UTC](https://community.thinkgeo.com/t/sql-query-processor-error/1986/10 "2012-06-01T14:07:44Z")

</div>

Hello&nbsp;Allen,&nbsp;  
&nbsp;&nbsp;  
&nbsp;In&nbsp;our&nbsp;algorithm,&nbsp;we’ll&nbsp;replace&nbsp;“where”&nbsp;with&nbsp;“And”,&nbsp;in&nbsp;where&nbsp;clause,&nbsp;so&nbsp;if&nbsp;the&nbsp;where&nbsp;clause&nbsp;cantains&nbsp;“or”,&nbsp;please&nbsp;add&nbsp;()&nbsp;to&nbsp;tnem,&nbsp;e.g.&nbsp;WHERE&nbsp;(1=1&nbsp;OR&nbsp;1=1).&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Gary

---

<div class="post-metadata">

**Author:** ![Allen](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@Allen](https://community.thinkgeo.com/u/Allen)\
**Post date:** [June 4, 2012, 12:15pm UTC](https://community.thinkgeo.com/t/sql-query-processor-error/1986/11 "2012-06-04T12:15:22Z")

</div>

Is&nbsp;this&nbsp;going&nbsp;to&nbsp;be&nbsp;considered&nbsp;a&nbsp;bug&nbsp;by&nbsp;ThinkGeo&nbsp;and&nbsp;eventually&nbsp;fixed&nbsp;or&nbsp;will&nbsp;the&nbsp;above&nbsp;be&nbsp;a&nbsp;"permanent&nbsp;workaround"?&nbsp;Someone&nbsp;else&nbsp;is&nbsp;bound&nbsp;to&nbsp;do&nbsp;the&nbsp;same&nbsp;thing&nbsp;sooner&nbsp;or&nbsp;later.&nbsp;Seems&nbsp;to&nbsp;me&nbsp;if&nbsp;you're&nbsp;already&nbsp;converting&nbsp;"WHERE"&nbsp;to&nbsp;"AND"&nbsp;it&nbsp;would&nbsp;be&nbsp;easy&nbsp;to&nbsp;strip&nbsp;off&nbsp;the&nbsp;"WHERE",&nbsp;enclose&nbsp;what's&nbsp;left&nbsp;in&nbsp;parenthesis,&nbsp;then&nbsp;tack&nbsp;on&nbsp;your&nbsp;"AND"&nbsp;to&nbsp;the&nbsp;front.&nbsp;  
  
  
  
Allen

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [June 5, 2012, 3:57pm UTC](https://community.thinkgeo.com/t/sql-query-processor-error/1986/12 "2012-06-05T15:57:39Z")

</div>

Hello&nbsp;Allen,&nbsp;  
&nbsp;&nbsp;  
&nbsp;For&nbsp;avoid&nbsp;the&nbsp;confuse,&nbsp;could&nbsp;you&nbsp;please&nbsp;post&nbsp;any&nbsp;new&nbsp;information&nbsp;in&nbsp;your&nbsp;ticket?&nbsp;Our&nbsp;team&nbsp;will&nbsp;answer&nbsp;your&nbsp;question&nbsp;there.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Gary

---

<div class="post-metadata">

**Author:** ![Allen](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@Allen](https://community.thinkgeo.com/u/Allen)\
**Post date:** [June 5, 2012, 7:53pm UTC](https://community.thinkgeo.com/t/sql-query-processor-error/1986/13 "2012-06-05T19:53:44Z")

</div>

Gary,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Sure,&nbsp;no&nbsp;problem.&nbsp;&nbsp;The&nbsp;ticket&nbsp;was&nbsp;at&nbsp;closed&nbsp;status&nbsp;and&nbsp;I&nbsp;wasn’t&nbsp;sure&nbsp;if&nbsp;anyone&nbsp;would&nbsp;be&nbsp;notified&nbsp;of&nbsp;new&nbsp;comments&nbsp;once&nbsp;the&nbsp;ticket&nbsp;was&nbsp;closed.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Allen

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [June 6, 2012, 3:10pm UTC](https://community.thinkgeo.com/t/sql-query-processor-error/1986/14 "2012-06-06T15:10:13Z")

</div>

Hello&nbsp;Allen,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Once&nbsp;we&nbsp;think&nbsp;the&nbsp;problem&nbsp;was&nbsp;resolved,&nbsp;we&nbsp;will&nbsp;set&nbsp;the&nbsp;ticket&nbsp;status&nbsp;as&nbsp;Resolved,&nbsp;but&nbsp;you&nbsp;can&nbsp;add&nbsp;new&nbsp;comments&nbsp;any&nbsp;time&nbsp;and&nbsp;the&nbsp;status&nbsp;will&nbsp;automatically&nbsp;change&nbsp;to&nbsp;pending.&nbsp;  
&nbsp;&nbsp;  
&nbsp;So&nbsp;for&nbsp;that&nbsp;ticket,&nbsp;please&nbsp;add&nbsp;any&nbsp;comments&nbsp;there&nbsp;and&nbsp;we&nbsp;will&nbsp;keep&nbsp;tracking&nbsp;that.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Gary

---

<div class="post-metadata">

**Author:** ![Allen](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@Allen](https://community.thinkgeo.com/u/Allen)\
**Post date:** [June 6, 2012, 5:13pm UTC](https://community.thinkgeo.com/t/sql-query-processor-error/1986/15 "2012-06-06T17:13:35Z")

</div>

OK&nbsp;Gary,&nbsp;I&nbsp;understand&nbsp;now.&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Allen

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [June 7, 2012, 12:55pm UTC](https://community.thinkgeo.com/t/sql-query-processor-error/1986/16 "2012-06-07T12:55:13Z")

</div>

Hello&nbsp;Allen,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Just&nbsp;let&nbsp;us&nbsp;know&nbsp;your&nbsp;questions.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Gary
